Just passed 9.4 but don't know why


here is my code:
for d in students:
for key in d:
print d[key]

I got this from some other site, I understand there are three dictionaries within list students, but I dont understand why I have to loop twice to get every value of three dictionaries out.


It's because you needed the key in d in students to print d's key.


This took me some time to figure out too.....I think what is happening here is the outer loop is looping through the list of student names and using that index value for the inner loop.