Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- text = open('input.txt')
- lines = text.readlines()
- symbols = str.maketrans('', '', '!@#$%^&*()}{]{,.?:;')
- dict = {}
- ofof = list()
- p = list()
- t = 0
- for line in lines:
- k = line.translate(symbols).split()
- ofof.extend(k)
- for i in ofof:
- dict[i] = dict.get(i, 0) + 1
- p.append(dict[i]-1)
- print(*p)
- text.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement