This is the best way to generate permutations in python.
from itertools import permutations
j="1234"
for i in permutations(j):
print "".join(i)
from itertools import permutations
j="1234"
for i in permutations(j):
print "".join(i)
0 comments:
Post a Comment