Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Well done!
You have completed (UPI) Chapter 12: Mastering Python Dictionaries!
Instruction
Looping on a Dictionary
Looping over a Python dictionary is a way to iterate through key-value pairs in the dictionary. Looping in a dictionary can be done by iterating over keys or items. When looping using keys, keys are obtained using the keys()
function and are passed to the loop variable one at a time. When looping over items using the items()
function, both the key and value for each item are passed to the l...