Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python Access both key and value using iteritems() Return keys or values explicitly

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

for key in dt.keys():
    print(key)

for value in dt.values():
    print(value)
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #python #Access #key #Return #keys #values #explicitly
ADD COMMENT
Topic
Name
3+8 =