Hussein Amr2,461 Points
Didn't get how printing the minutes of the courses works
for course in course_minutes: print(course_minutes[course])
How does that print the values exactly?
Chris FreemanTreehouse Moderator 58,897 Points
Let's look at the two statements. First:
for course in course_minutes:
course_minutesas an iterable object
- take each item from the iterable and assign it to the variable
- then run the loop code using this new value of
dict is used in the context of an iterable, it will respond with a list of the dictionary keys. So
course will contain the various course names.
- use the
coursedefined by the for loop as the key to the dict
- look up the value, and print it
Hope this helps. Post back if you need more help. Good Luck!!