Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #/usr/bin/env pyhton3
- import string
- numberbet = {}
- count = 1
- for letter in string.ascii_lowercase:
- numberbet[letter] = count
- count += 1
- def count_word(word):
- count = 0
- for letter in word.lower():
- count += numberbet[letter]
- return count
- with open('/usr/share/dict/words', 'r') as f:
- for line in f:
- line = line.strip()
- if line.isalpha():
- if count_word(line) == 100:
- print(line)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement