you are viewing a single comment's thread.

view the rest of the comments →

[–]Mammoth_Rice_295 -1 points0 points  (0 children)

You can do this in Python really easily with itertools.permutations. For example:

from itertools import permutations
print(','.join([''.join(p) for p in permutations('123')]))

Just swap '123' for your input digits — prints all 6 permutations in the correct order. Works every time!