programming-examples/python/Dictionary/Python program to iterate over dictionaries using for loops.py

3 lines
115 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
d = {'x': 10, 'y': 20, 'z': 30}
for dict_key, dict_value in d.items():
print(dict_key,'->',dict_value)