Name
rstrip
Synopsis
s
.rstrip(x
=None)
Returns a copy of s
with trailing
whitespace, if any, removed. Since Python 2.2.2, you can optionally
pass a string x
as an argument, in which
case rstrip
removes characters found in
x
rather than removing whitespace.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.