__author__ = 'Mark'
import itertools
def power(num, x=1):
result = 1;
for x in range(x):
result = result * num
return result
print power(4,7)
count = 0
for subset in itertools.product('0123456', repeat = 4):
print(subset)
count +=1
print count
I need to enumerate all possible permutation of a 4-digit number using 0-6 only with repetition.
itertoolsmodule in python - docs.python.org/2/library/itertools.html & try to solve the question. If you are still facing issues then you can reach out. Without an attempt to solve the problem the SO community would not help!