+ 6
[Solved] Why does my Python strip function not work?
6 ответов
+ 6
What do you mean by not working?
strip() removes whitespaces from the beginning and end of the string. But your test string did not have any extra spaces anyway.
+ 5
Tibor Santa thanks. I was under the impression that it removes all white space! My bad.
+ 4
Sonic
You can also remove spaces from a single side with rstrip() or lstrip(). 🙂
+ 4
Sonic
You are welcome! 🙂👍
+ 3
Original code modified.
+ 2
Jan Markus thanks for the info! 👍