Advertisement
Guest User

Untitled

a guest
Jan 14th, 2012
14,653
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #! C:\python27
  2.  
  3. import string, random
  4.  
  5. #============ Word List Gen ============
  6. minimum=input('Please enter the minimum length of any give word to be generated: ')
  7. maximum=input('Please enter the maximum length of any give word to be generated: ')
  8. wmaximum=input('Please enter the max number of words to be generate in the dictionary: ')
  9.  
  10. alphabet = string.letters[0:52] + string.digits + string.punctuation
  11. string=''
  12. FILE = open("wl.txt","w")
  13. for count in xrange(0,wmaximum):
  14.   for x in random.sample(alphabet,random.randint(minimum,maximum)):
  15.       string+=x
  16.   FILE.write(string+'\n')
  17.   string=''
  18. FILE.close()
  19. print 'DONE!'
  20.  
  21. #============    WLG END    ============
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement