Skip to content

Instantly share code, notes, and snippets.

@mattrobenolt
Created August 26, 2010 06:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattrobenolt/550942 to your computer and use it in GitHub Desktop.
Save mattrobenolt/550942 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
if __name__ == '__main__':
import random, math, string
#words = 'my fist will cheat your face'.split(' ')
words = '0 1 2 3 4 5 6 7 8'.split(' ')
phrases = []
max = math.factorial(len(words))
loops = 0
while len(phrases) < max:
loops+=1
random.shuffle(words)
phrase = '%s.' % string.capitalize(' '.join(words))
if not phrase in phrases:
phrases.append(phrase)
print '%s %d/%d/%d/%d' % (phrase, len(phrases), loops, max-len(phrases), loops-len(phrases))
print '\n', '='*20
print 'Total: %d/%d' % (max, loops)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment