Created
January 8, 2018 05:14
-
-
Save wjmccann/9f268de12c64084da37f9be415c6088c to your computer and use it in GitHub Desktop.
Generate all possible 6 digit combinations in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
for combination in itertools.product(range(10), repeat=6): | |
print(''.join(map(str, combination))) |
I only want combinations involving digits 0 and 8
@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
smooth.