Here are 2 ways to convert all items in a list to a lower case:
(1) Using a List Comprehension:
my_list = ["AA", "BB", "CC", "DD", "EE"]
lower_case_list = [i.lower() for i in my_list]
print(lower_case_list)
The result:
['aa', 'bb', 'cc', 'dd', 'ee']
(2) Using a For Loop:
my_list = ["AA", "BB", "CC", "DD", "EE"] lower_case_list = [] for i in my_list: lower_case_list.append(i.lower()) print(lower_case_list)
The result:
['aa', 'bb', 'cc', 'dd', 'ee']
You can view the following guide to learn how to convert all items in a list to upper case.