Beginner
Python
Q28 / 101
What does the strip() method do to a string?
Correct! Well done.
Incorrect.
The correct answer is C) Removes leading and trailing whitespace
C
Correct Answer
Removes leading and trailing whitespace
Explanation
" hello ".strip() returns "hello". Use lstrip() or rstrip() to strip only one side.
Progress
28/101