5 questions to test your understanding
What does the following code print? s = "hello" s.upper() print(s)
What does s[1:4] return when s = "python"?
The expression s[::-1] reverses the string s.
Calling s.strip() on a string removes its leading and trailing whitespace by modifying the original string in place.
Why must you write s = s.upper() rather than just s.upper() if you want s to hold the uppercased version of the string?