0
listx = ['Day Mover ', 'Resurg Micro']

Is there a way to make all words lower case and remove all spaces in general code? I tried:

new_list = [elem for elem in listx if elem.strip()]

Expected output:

new_list = ['day_mover', 'resurg_micro']
 
jezrael
  • 729,927
  • 78
  • 1,141
  • 1,090
Arpp
  • 107
  • 4

0 Answers0