Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python Access both key and value using iteritems()

dt = {'a': 'juice', 'b': 'grill', 'c': 'corn'}

for key, value in dt.iteritems():
    print(key, value)
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #python #Access #key
ADD COMMENT
Topic
Name
8+9 =