1. Working with text
Try firstWhat does " Hello World ".strip().lower().split() give?
Check your answer
["hello", "world"]: spaces off the ends, small letters, then cut into words.
strip()removes the spaces at both ends;lower()makes every letter small. Each gives back new text.split()cuts text into a list of words at the spaces, sowords[0]is the first word.- Tidy text before comparing it:
"Yes" == "yes"is False.