Source Code:
(back to article)
original_string = " some text with whitespace " left_stripped = original_string.lstrip() right_stripped = original_string.rstrip() print(left_stripped) # Output: "some text with whitespace " print(right_stripped) # Output: " some text with whitespace"
Result:
Report an issue