📜  rstrip python 代码示例

📅  最后修改于: 2022-03-11 14:45:06.453000             🧑  作者: Mango

代码示例2
text = "   hello   "

text = text.lstrip() # lstrip == left strip
>>> '   hello' 

text = text.rstrip() # rstrip == right strip
>>> 'hello   '

text = text.strip() # strip == strip from both sides
>>> 'hello'