29-输入题:strip 后统计长度
语法讲解
今天学: 输入字符串处理:strip + len
s = input()
s = s.strip()
print(len(s))
小练习
输入为:␠␠hello␠␠(两端各两个空格)。运行下面代码后输出是什么?
s = input()
s = s.strip()
print(len(s))
提交要求: 只提交最终输出结果,不要添加多余的说明或引号。
今天学: 输入字符串处理:strip + len
s = input()
s = s.strip()
print(len(s))
输入为:␠␠hello␠␠(两端各两个空格)。运行下面代码后输出是什么?
s = input()
s = s.strip()
print(len(s))
提交要求: 只提交最终输出结果,不要添加多余的说明或引号。
全部评论