Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get value and key from dict python

myDict = {
    "message": "Hello Grepper!"
}
for key, value in myDict.items():
    print(key)      #Output: message
    print(value)    #Output: Hello Grepper!
Source by note.nkmk.me #
 
PREVIOUS NEXT
Tagged: #key #dict #python
ADD COMMENT
Topic
Name
4+1 =