-3

Quick one: How do I convert list items(words) into smaller cases?

states_list = ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California']
Don Kalonji
  • 165
  • 3
  • 13

1 Answers1

0

You can simply use the method .lower() on the items and create a new list using list comprehension.

foo = [i.lower() for i in states_list]
print (foo)

which results in a new list of

['alabama', 'alaska', 'arizona', 'arkansas', 'california']
SimonT
  • 974
  • 1
  • 5
  • 9