Iterate over a dictionnary

To iterate over a dictionnary in a for loop, you have to use the following syntaxe

for key, value in d.items():

Here is a examples printing the keys and values of a dictionnary

d = {"key1":"value 1", "key2": "value 2", "key3" :"value 3"}
for key, value in d.items():
    print(f'{key} : {value}')
key1 : value 1
key2 : value 2
key3 : value 3