Answers for "rstrip() in pyhton"

5

rstrip in python

text = "     Apple      "
x = txt.rstrip()
>>> '     Apple'
x.rstrip('e')
>>> '  Appl'
x.lstrip()
>>> 'Apple'
Posted by: Guest on March-09-2021

Python Answers by Framework

Browse Popular Code Answers by Language