Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def f(file):
- file = open(file,"r")
- righe = file.readlines()
- d = {}
- for riga in righe:
- parole = riga.strip().split()
- for parola in parole:
- for c in parola:
- if c in d:
- d[c] += 1
- else:
- d[c] = 1
- massimo = 0
- l = []
- for k in d:
- l.append(d[k])
- l.sort()
- print(l[len(l) - 3])
- f("test.txt")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement