Since your list only contains the numbers 0 through 9 and you're looping over that list, printing the content as you go, it will only print 0 through 9.
Since all possible combinations (or rather permutations, because that's what you're asking about) of the normal decimal digits are just the numbers 0 through 9999, you could do this instead:
for i in range(10000):
print(i)
See https://docs.python.org/3/library/functions.html#func-range for more on range()
.
But that doesn't print numbers like '0' as '0000'. To do that (in Python 3, which is probably what you should be using):
for i in range(10000):
print(f"{i:04d}")
See https://docs.python.org/3/reference/lexical_analysis.html#f-strings for more on f-strings.
Of course, if you need permutations of something other than digits, you can't use this method. You'd do something like this instead:
from itertools import permutations
xs = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
for t in permutations(xs, 4):
print(''.join(t))
See https://docs.python.org/3/library/itertools.html#itertools.permutations for more on permutations()
and the difference with combinations()
.