Answers for "iterating through nested dictionary python"

15

iterate through dictionary c#

foreach(var item in myDictionary)
{
  foo(item.Key);
  bar(item.Value);
}
Posted by: Guest on December-19-2019
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 "iterating through nested dictionary python"

Python Answers by Framework

Browse Popular Code Answers by Language