rstrip() is used in string for removing the white space from the right side of the string.Example:s="Hello world "len(s) // 14s=s.rstrip()len(s) // 11
Example:
s="Hello world "
len(s) // 14
s=s.rstrip()
len(s) // 11