passwords - python calculates all possible combinations of given characters -


i'm trying make program calculates possible combinations of given characters abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz1234567890... 8 spots like, aaaaaaaa, aaaaaaaa, aaaaaaaa...

something start

for in xrange(999999999):

print ''.join(['abcdefghijklmnopqrstuvwxyz0123456789'[j] 

for j in [(i//d)%36 d in (63,54,45,36,27,9,3,1)]])

i figured out work above help

this take while run since there lot of possible permutations. know beforehand. solution:

from itertools import permutations  options = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz1234567890' possibilities = [w w in permutations(options, 8)] 

this make list of possible passwords stored in possibilities variable.


Comments