标签:line lin TE strip users span des user []
#!/usr/bin/env python
# coding=utf-8
aa = open(‘C:/Users/12041/Desktop/text.txt‘,‘r‘,encoding=‘utf-8‘)
a = []
while True:
line = aa.readline().strip()
if line:
a.append(line)
else:
break
b = list(set(a))
for i in b:
print("%s has %s"%(i,a.count(i)))
标签:line lin TE strip users span des user []
原文地址:https://www.cnblogs.com/yymhaha/p/9250499.html