RosettaCodeData/Task/Associative-array-Creation/Python/associative-array-creation-1.py
2023-07-01 13:44:08 -04:00

4 lines
154 B
Python

hash = dict() # 'dict' is the dictionary type.
hash = dict(red="FF0000", green="00FF00", blue="0000FF")
hash = { 'key1':1, 'key2':2, }
value = hash[key]