my_dict = {'KEY1': "Hello", 'Key2': "World"}
new_dict = dict((k.lower(), v) for k, v in my_dict .items())
print(new_dict
def lower_dict(d):
new_dict = dict((k.lower(), v.lower()) for k, v in d.items())
return new_dict
a = {'Foo': "Hello", 'Bar': "World"}
print(lower_dict(a))
my_dict = {'KEY1': "Hello", 'Key2': "World"}
new_dict = dict((k.upper(), v.upper()) for k, v in my_dict .items())
print(new_dict)
def lower_dict(d):
new_dict = dict((k.lower(), v) for k, v in d.items())
return new_dict
a = {'Foo': "Hello", 'Bar': "World"}
print(lower_dict(a))
my_dict = {'KEY1': "Hello", 'Key2': "World"}
new_dict = dict((k, v.lower()) for k, v in my_dict .items())
print(new_dict)