Answers for "Create a function iterate Dictionary(some list) that, given a list of dictionaries, the function loops through each dictionary in the list and prints each key and the associated value. For example, given the following list:"

37

python iterate through dictionary

a_dict = {'apple':'red', 'grass':'green', 'sky':'blue'}
for key in a_dict:
  print key # for the keys
  print a_dict[key] # for the values
Posted by: Guest on November-12-2019

Code answers related to "Create a function iterate Dictionary(some list) that, given a list of dictionaries, the function loops through each dictionary in the list and prints each key and the associated value. For example, given the following list:"

Python Answers by Framework

Browse Popular Code Answers by Language