Skip to content

Instantly share code, notes, and snippets.

@JokerMartini
JokerMartini / Rename Dictionary Key | .py
Last active June 18, 2022 18:04
Python: Renames recursively every key in a dictionary to lowercase.
import sys
data = {
'MIKE' : ['Great'],
'SUE' : ['happy'],
'JAN' : ['sad']
}
for k, v in data.items():
print k, v