There are many examples how to get all combinations of n items of length l, if l <= n. But how about get all combinations of n items (f.i. digits) of lenght l, where n < l, for instance:
n = 3 ([0,1,2])
l = 5
sequence to get:
00000
00001
00002
00010
...
22222
It is not a problem to implement it, but I suppose it is possible to do using itertools. I can not find how.