题解 | #删除左右两边多余空格#
格式化输出(三)
https://www.nowcoder.com/practice/cc6cb2b4aac446da902356fec043f5c1
name=input() print(name.strip()) /* .strip() --- 删除两边空格 .lstrip() --- 删除左边空格 .rstrip() --- 删除右边空格 .replace(" ","") --- 删除所有空格 .split() --- 先切分,"".join() --- 再拼接 */