list.append(each)有什么用处呢?
str1 = '''拷贝过来的字符串'''list1 = []
for each in str1:
if each not in list1:
if each == '\n':
print('\\n', str1.count(each))
else:
print(each, str1.count(each))
list1.append(each) 将each添加到列表里 昨非 发表于 2020-12-20 21:24
将each添加到列表里
为什么我去掉他就无限循环了? longzhou520 发表于 2020-12-20 21:26
为什么我去掉他就无限循环了?
为什么要去掉
你得先看明白他是干嘛的 longzhou520 发表于 2020-12-20 21:26
为什么我去掉他就无限循环了?
懂了懂了 谢谢{:5_109:} longzhou520 发表于 2020-12-20 21:29
懂了懂了 谢谢
小问题
页:
[1]