Telling my code to generate all combinations of 00000 to 99999 but it doesn't?
You're confusing the difference between combination and product. Combinations preserve the order of the elements from a given set::
combinations_with_replacement('ABC', 2) --> AA AB AC BB BC CC
As you see in the example above, combinations does not give you BA, CA or CB.
It appears that you are looking for a product
, which gives you back a Cartesian product with all elements regardless of their order.
product(range(2), repeat=3) --> 000 001 010 011 100 101 110 111
something like::
map(''.join, product(map(str, range(10)), repeat=5))
Use a cartesian product:
from itertools import product
one = [i for i in range(0,10)]
tmp = [one for i in range(5)]
combs = [i for i in product(*tmp)]