The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Remove Trailing Whitespace From A Python String With .rstrip()

TODO: Pull subtitle into page object
Code
original = """

    echo foxtrot golf   

    """

right_stripped = original.rstrip()

print(f"START|{right_stripped}|END")
Results
START|

    echo foxtrot golf|END

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Remove Trailing Whitespace From A Python String With .rstrip()

Call `.rstrip()`` on a python string to remove any trailing
whitespace (including newline characters). For example, 
this text has both leading and trailing whitespace and newlines.
Calling `.rstrip()`` trims the trailing characters while
leaving the leading characters in place. For example, this
removes the trailing spaces and newlines from the the string
while leaving the leading characters alone


-- code
-- python

original = """

    echo foxtrot golf   

    """

right_stripped = original.rstrip()

print(f"START|{right_stripped}|END")

-- results/

START|

    echo foxtrot golf|END

-- /results


-- categories
-- Python

-- metadata
-- date: 2021-08-25 20:18:04
-- id: 20eomiuj
-- type: post 
-- site: aws
-- status: published