Skip to content

Instantly share code, notes, and snippets.

@wjmccann
Created January 8, 2018 05:14
Show Gist options
  • Save wjmccann/9f268de12c64084da37f9be415c6088c to your computer and use it in GitHub Desktop.
Save wjmccann/9f268de12c64084da37f9be415c6088c to your computer and use it in GitHub Desktop.
Generate all possible 6 digit combinations in Python
import itertools
for combination in itertools.product(range(10), repeat=6):
print(''.join(map(str, combination)))
@esirK
Copy link

esirK commented Apr 25, 2023

@RajaTunio how about

for combination in itertools.product([0,8], repeat=6):
    print(''.join(map(str, combination)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment