Created
November 28, 2018 00:59
-
-
Save shoark7/ff46a23a53dc4bae1bf64fbbd1ac4263 to your computer and use it in GitHub Desktop.
:)
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
| def iterate(a, b, c): | |
| l = [a, b, c] | |
| l = [n if n else 1 for n in l] | |
| def find(chosen, got): | |
| if got == 3: | |
| print(''.join(chosen)) | |
| return | |
| for i in range(l[got]): | |
| chosen.append(str(i)) | |
| find(chosen, got+1) | |
| chosen.pop() | |
| find([], 0) | |
| print(iterate(2, 0, 3)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment