Skip to content

Instantly share code, notes, and snippets.

@vcode11
Created May 5, 2020 13:22
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 vcode11/12b9f839726b515e1eb67f40f2d635f4 to your computer and use it in GitHub Desktop.
Save vcode11/12b9f839726b515e1eb67f40f2d635f4 to your computer and use it in GitHub Desktop.
import itertools
family = ['jake', 'melissa', 'oliver', 'emily']
years = ['1987', '1954', '1963']
symbols = ["!","@","#","$","%","&","*","-","=","_","+",".",","]
count = 0
for member in family:
for year in years:
for symbol in symbols:
words = [member, year, symbol]
for word in itertools.permutations(words,3):
print(''.join(word))
count+=1
print('Tried {} possibilties'.format(count))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment