Created
September 22, 2021 09:47
-
-
Save mkpoli/d2df5add0b382a913adf559d90f7d67d to your computer and use it in GitHub Desktop.
Generator all combination from 00 to zz (include duplication)
This file contains hidden or 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 string | |
| import itertools | |
| characters = [*map(str, range(10)), *list(string.ascii_lowercase)] | |
| print(characters) | |
| all_combi = list( | |
| map( | |
| lambda x: f'{x[0]}{x[1]}', | |
| itertools.product(characters, repeat=2) | |
| ) | |
| ) | |
| print(all_combi) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment