Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-*- coding: utf-8 -*-
- from string import ascii_lowercase
- from collections import Counter
- import string
- chars = []
- allowed = string.ascii_letters +"æ" "ø" "å"
- d = {}
- #Initialize d
- for letter in allowed:
- d[letter] = 0
- with open('/Users/Thomas/Dropbox/Boag-3R.R/SRP/tællemaskine/tekst.txt') as f:
- for c in f.read():
- d[c.lower()] += 1
- print d
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement