Python

“Eventually I got better – I started making my own mistakes.”

Formatting

>>> print ("this is a {LENGTH} {STRING} print").format(LENGTH='short', STRING='test')
this is a short test print
>>> 

Virtual Environment

$ python3 -m venv venv
 
EACH time you will need to run this to avtivate the virtual env:-
 
$ source venv/bin/activate
(venv) $ _

pip freeze > requirements.txt


rb/python.txt · Last modified: 21/05/2019 14:23 by andrew