What does the strip() method do in Python?
Correct answer
D. Removes leading and trailing whitespace
5 views
D. Removes leading and trailing whitespace
5 views
strip() removes whitespace (or specified characters) from both ends of a string.
Asked in: Python Interview Strings
https://docs.python.org/3/library/stdtypes.html#string-methodsNot sure why the answer is D? Ask here and get an explanation.