Mega Code Archive
Categories
/
Python
/
Dictionary
For each loop with dictionary
D = {'a':1, 'b':2, 'c':3} for key in D: print key, D[key]