📅  最后修改于: 2022-03-11 14:45:06.453000             🧑  作者: Mango
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'