Skip to content

Instantly share code, notes, and snippets.

@shoark7
Created November 28, 2018 00:59
Show Gist options
  • Select an option

  • Save shoark7/ff46a23a53dc4bae1bf64fbbd1ac4263 to your computer and use it in GitHub Desktop.

Select an option

Save shoark7/ff46a23a53dc4bae1bf64fbbd1ac4263 to your computer and use it in GitHub Desktop.
:)
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