
Code: Select all
f = open('rfc3280.txt')
words = []
for line in f:
temp = line.split()
for item in temp:
if len(item) == 9:
words.append(item)
for item in words:
print item, words.count(item)
Code: Select all
f = open('rfc3280.txt')
words = []
for line in f:
temp = line.split()
for item in temp:
if len(item) == 9:
words.append(item)
for item in words:
print item, words.count(item)