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-data-struct [21/04/2020 15:20]
andrew [Dictionary]
rb:python-data-struct [22/05/2020 12:31] (current)
andrew [Dictionary]
Line 73: Line 73:
 </​code>​ </​code>​
  
 +
 +Testing if a key exists in a dictionary
 +<code python>
 +if record["​Key1"​] in record:
 +    record["​Key2"​] = record["​Key1"​]
 +</​code>​
  
  

rb/python-data-struct.txt ยท Last modified: 22/05/2020 12:31 by andrew