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 [24/06/2019 11:13] (current)
andrew [Lists and Dicts]
Line 24: Line 24:
  
 pip freeze > requirements.txt pip freeze > requirements.txt
 +
 +
 +===== 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