Python Function Reference

strip
Return a copy of the string with the leading and trailing characters removed.
Python 3.13
str.strip([chars])
chars
The characters to be removed (defaults to whitespace).
Examples
Python 3.13
>>> '  hello world  '.strip()
'hello world'