Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from collections import Counter
- def count_chars():
- char_dic = {}
- with open('rarechar') as f:
- while True:
- string = f.read()
- if not string:
- print("End of file")
- break
- print(Counter(string))
- count_chars()
Add Comment
Please, Sign In to add comment