I am finding it difficult to iterate through a dictionary in python.
I have already finished learning via CodeAcademy and solo learn but still find it tough to go th
Dictionaries are the python equivalent of Hash table. It stores values as key-value pairs. Values can be any python objects whereas, keys need to immutable.
Below are some of the ways to iterate over a dictionary in python
# Iterating over the keys.
for k in dict:
for k in dict.keys():
#Iterating over the values.
for v in dict.values():
#Iterating over both the key and values.
for k,v in dict.items():