Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2014
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. import itertools
  2.  
  3. wordList = open("wordlist.txt", "r").readlines() # import words into list
  4. wordListOut = open("output.txt", "w")
  5.  
  6. wordList = [item.rstrip() for item in wordList] # strip n from list items
  7. for item in [x for x in itertools.permutations(wordList, 3)]:
  8. wordListOut.write("".join("%s %s %sn" % item))
  9.  
  10. wordListOut.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement