Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

rstrip python3

#python3 program of rstrip method with optional argument
s = "Hello There     "
a = "s"
print(s.rstrip()) # prints s without any spaces at the end
print(s.rstrip(a)) # prints s without any characters of value a at the end
 
PREVIOUS NEXT
Tagged: #rstrip
ADD COMMENT
Topic
Name
8+6 =