Python 95分求解
查看原帖
Python 95分求解
635555
Pol_Pot楼主2022/6/25 19:01

本以为是道简简单单的

大水题

没想到#17卡了我这么久

代码如下:

a=list(input())
for i in a:
    if i == ' ' or i == '\n':
        a.remove(i)
print(len(a))

我的思路是输入弄个列表

遍历列表,是空格或换行就从列表里删了

最后len一下列表

但#17过不了

望dalao帮助

2022/6/25 19:01
加载中...