a guest Jan 24th, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. with open('wordlist.txt') as wordList: #open wordlist file
  2.   for word in wordList: #iterate through words in list
  3.     wordTotal = 0
  4.     for c in word.upper(): #iterate through letters in word
  5.       charNum = ord(c)-64 #convert a-z to 1-26
  6.       if charNum >= 1 and charNum <= 26: #ignore non-letters
  7.         wordTotal += charNum #add letter to word total
  8.     if wordTotal == 100:
  9.       print (word)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand