Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. import collections
  2. d = collections.Counter()
  3. letter = 0
  4. myfile = open('output_text1.txt')
  5. for line in myfile:
  6.     line = line.rstrip('\n')
  7.     for c in line:
  8.         d[c] += 1
  9.         letter += 1
  10. print (d)
  11. print(letter)
  12. myfile.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement