Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

dictionary in python

#a dictionary
dict = {
  "key": "value",
  "other_key": "value"
}

#get a value from the dictionary using the key
print(dict["key"])

#you can also get a value from the dictionary using a normal index:
print(dict[1])
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #dictionary #python
ADD COMMENT
Topic
Name
8+1 =