Guest User

Untitled

a guest
Jul 18th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. from collections import Counter
  2. def count_chars():
  3. char_dic = {}
  4. with open('rarechar') as f:
  5.  
  6. while True:
  7. string = f.read()
  8. if not string:
  9. print("End of file")
  10. break
  11. print(Counter(string))
  12. count_chars()
Add Comment
Please, Sign In to add comment