Back to Lesson
Standardizing Input
Use a list comprehension to format a list of user inputs.
Instructions
- Given.
names = [" alice", "BOB ", " charlie "] - Use a list comprehension to strip spaces and convert to title casefor each string.
.title() - Print the resulting list.
main.py
main.py
Ctrl + Enter