python code to convert all keys of dict into lowercase
my_dict = {'KEY1': "Hello", 'Key2': "World"}
new_dict = dict((k.lower(), v) for k, v in my_dict .items())
print(new_dict
python code to convert all keys of dict into lowercase
my_dict = {'KEY1': "Hello", 'Key2': "World"}
new_dict = dict((k.lower(), v) for k, v in my_dict .items())
print(new_dict
convert dictionary keys/values to lowercase in python
my_dict = {'KEY1': "Hello", 'Key2': "World"}
new_dict = dict((k.upper(), v.upper()) for k, v in my_dict .items())
print(new_dict)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us