Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rb:python [21/05/2019 14:23]
andrew [Formatting]
rb:python [12/09/2019 13:09] (current)
andrew [Virtual Environment]
Line 22: Line 22:
 </​code>​ </​code>​
  
 +''​pip freeze''​ shows current modules, so echo this to ''​requirements.txt''​ to automatically load modules ​
  
-pip freeze > requirements.txt+  ​pip freeze > requirements.txt 
 + 
 + 
 +To quit the venv, use ''​deactivate''​ command (which venv adds to your path) 
 + 
 + 
 +===== Lists and Dicts ===== 
 + 
 + 
 +==== List ==== 
 + 
 +uses comma as sep and square brackets 
 + 
 +<code python>​ 
 +list = ["​value1",​ "​value2"​] 
 +</​code>​ 
 + 
 + 
 +==== Dictionary ==== 
 + 
 + 
 +uses ":"​ and curly brackets 
 + 
 +<code python>​ 
 +dict = { "​key1":​ "​value1",​ "​key2":​ "​value2"​ } 
 +</​code>​
  

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