Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

convert dictionary keys/values to lowercase in python

my_dict = {'KEY1': "Hello", 'Key2': "World"} 
new_dict = dict((k, v.lower()) for k, v in my_dict .items()) 
print(new_dict)
Source by www.datasciencelearner.com #
 
PREVIOUS NEXT
Tagged: #convert #dictionary #lowercase #python
ADD COMMENT
Topic
Name
1+6 =