发布时间:2019-09-21 10:57:02编辑:auto阅读(5989)
字符串里有三个去空格的函数
strip 同时去掉左右两边的空格
lstrip 去掉左边的空格
rstrip 去掉右边的空格
>>>a=" gho stwwl "
>>>a.lstrip()
'gho stwwl '
>>>a.rstrip()
' gho stwwl'
>>>a.strip()
'gho stwwl'
上一篇: 卸载python最干净的办法
下一篇: Python 中的range(),ara
51596
51186
41689
38450
32935
29922
28627
23592
23523
21870
2028°
2741°
2287°
2215°
2693°
2242°
2989°
4931°
4786°
3405°