#traversing dictionary function d={1:'one',2:'two',3:'three',4:'four'} print(d) for i in d: print(i,d[i])