There is a code:
import itertools for i in itertools.combinations_with_replacement('0123456789', 4): print(''.join(i)) I need to get all combinations of numbers in 4 repetitions. Part of the output of the program:
0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 0011 0012 0013 0014 0015 0016 0017 0018 0019 0022 0023 0024 0025 Tell me why after 0009 is 0011 , and not 0010 ? Also from 0022 .
for i in range(10**4):print("%04d" % i)- jfs