题解 | #格式化输出(三)#
格式化输出(三)
https://www.nowcoder.com/practice/cc6cb2b4aac446da902356fec043f5c1
#strip() 去掉字符串两边空格 .lsrip()去掉左边空格 .rstrip()去掉右边空格 .replace("","")去掉所有空格
name=input()
print(name.strip())
去空格格式见注释:
巧记:strip清除两边,前面+l(r)强调清除方向
希望这个记忆方法能够更好的帮到你:)
