There are two common ways to iterate over a dictionary in Python. To iterate over the keys:
for key in my_dict:
    print(key)for key, val in my_dict.items():
    print(key, val)There are two common ways to iterate over a dictionary in Python. To iterate over the keys:
for key in my_dict:
    print(key)for key, val in my_dict.items():
    print(key, val)