Python Program to Iterate Over Dictionaries Using for Loop (Access both key and value using items())

bookmark

dt = {'a': 'juice', 'b': 'grill', 'c': 'corn'}

for key, value in dt.items():
    print(key, value)

 

Output

a juice
b grill
c corn