I have this piece of code that will generate all combinations of a 3-digit number
for n1 in range(10):
for n2 in range(10):
for n3 in range(10):
print(n1,n2,n3)
input()
so this will generate 001,002,003... all the way to 999 and this works fine, my question is how do I extend this code to run with a custom amount of digits that I can input? For example, if I say 5, it should run 5 for loops and print all the results in order to get 00001,00002... 99999. So how do I dynamically create more for loops without writing them myself?