Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from glob import glob
- counts = {v : 0 for v in "aáeéěiíoóuúů"}
- text = "".join([open(f, "r").read() for f in glob("*.txt")])
- vowels = list(filter(lambda x : x in "aáeéěiíoóuúů", text))
- for e in vowels:
- counts[e] = counts[e] + 1
- [print("{}: {}".format(v, c)) for v, c in counts.items() if c > 0]
Advertisement
Add Comment
Please, Sign In to add comment