题解 | #格式化输出(三)#
格式化输出(三)
https://www.nowcoder.com/practice/cc6cb2b4aac446da902356fec043f5c1
x = input() print(x.strip())
Python去掉字符串中的空格
- strip()去掉字符串两边空格
- lstrip()去掉字符串左边空格
- rstrip()去掉字符串右边空格
- eg:
复制代码
1 2 3 4 5 6 7 8 |
|
格式化输出(三)
https://www.nowcoder.com/practice/cc6cb2b4aac446da902356fec043f5c1
x = input() print(x.strip())
复制代码
1 2 3 4 5 6 7 8 |
|
相关推荐
萨德楽陈:能进去你就是最牛逼的,不会学就完了