Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python iterate dictionary key value

a_dict = {'color': 'blue', 'fruit': 'apple', 'pet': 'dog'}
for key, value in a_dict.items():
  print(key, '->', value)
 
PREVIOUS NEXT
Tagged: #python #iterate #dictionary #key
ADD COMMENT
Topic
Name
1+3 =