I am trying to create a list of numbers from 0-9999 using itertools.product. I am able to create a list from 0000-9999 by doing the follow
0-9999
itertools.product
0000-9999
numbers = ['0','1','2','3','4','5','6','7','8','9'] list(''.join(subl) for subl in itertools.chain.from_iterable(itertools.product(numbers, repeat=i) for i in range(1,5)))