Get key and value from dictionary in Python

In python, for loop can be used to iterate over the key and value pair of dictionary. items() method provides set like object on dictionary's items.

Example
age = {'Musk': 43, 'Bill': 61}
for key,value in age.items():
    print(key + ' with age '+ str(value))

Output
Bill with age 61
Musk with age 43