Differences

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

Link to this comparison view

Both sides previous revision Previous revision
rb:python [24/06/2019 10:44]
andrew [Virtual Environment]
rb:python [24/06/2019 11:13] (current)
andrew [Lists and Dicts]
Line 29: Line 29:
  
  
-List+==== List ====
  
-Dict+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.txt ยท Last modified: 24/06/2019 11:13 by andrew