str.rstrip

rstrip([chars])

Return a copy of the string with trailing characters removed. The chars argument is a string specifying the set of characters to be removed. If omitted or None, the chars argument defaults to removing whitespace. The chars argument is not a suffix; rather, all combinations of its values are stripped:

    >>> '   spacious   '.rstrip()
    '   spacious'
    >>> 'mississippi'.rstrip('ipz')
    'mississ'

Changed in version 2.2.2: Support for the chars argument.

 

A Django site. this page was rendered by a django application in 0.02s 2008-12-03 22:22:36.069037. hosted by webfaction.