x = {'a': 10, 'b': 20, 'c': 30, 'd': 40}
for key in x.keys(): print(key)
또는
for key in x: print(key)
for value in x.values(): print(value)
for key, value in x.items(): print(key, value)
for key, value in x.items(): x[value] = key