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']
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']