DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
2+1 =
Submit