Articles → Python → Strip Function In PythonStrip Function In PythonIn this article, we will discuss the strip function in Python.Purpose The strip function removed leading and trailing space from a string.Example message = " this is the test message " print("Message before striping:",message) print("Message after striping:",message.strip())Output Posted By - Karan Gupta Posted On - Thursday, May 16, 2019 Query/Feedback Your Email Id** Subject* Query/Feedback Characters remaining 250**
message = " this is the test message " print("Message before striping:",message) print("Message after striping:",message.strip())
Query/Feedback