2.42

with open('统计2.2.txt') as fp:
L1 = []; L2 = [];
for line in fp:
L1.append(len(line))
L2.append(len(line.strip()))
data=[str(num)+'\t'for num in L2]
print(L1);print(L2)
with open('统计2.2.txt','w') as fp2:
fp2.writelines(data)

posted @ 2024-10-27 23:39  世梦  阅读(20)  评论(0)    收藏  举报