Playing around with some number theory problems. I would like a way to loop (n-times) over all the digits from 0 to 9, given n.
Assuming an easier way is to first generate all the tuples and loop over them once, what is the quickest way (in Python) to generate all n-tuples with elements the digits from 0 to 9? E.g. for n=2, (0,0), (0,1), (0,2)...(9,8),(9,9).