Remove Leading And Trailing Whitespace From A Python String With .strip()
=
=
Output:
START|alfa bravo charlie|END
Notes
-
Calling
.strip()
removes both leading and trailing whitespace (including newline characters) from a string -
This is called
trim
in some other languages
-- end of line --