RosettaCodeData/Task/Permutations/Python/permutations-3.py

16 lines
177 B
Python
Raw Permalink Normal View History

2015-11-18 06:14:39 +00:00
for u in perm1(3): print(u)
(0, 1, 2)
(0, 2, 1)
(1, 0, 2)
(1, 2, 0)
(2, 1, 0)
(2, 0, 1)
for u in perm2(3): print(u)
(0, 1, 2)
(0, 2, 1)
(1, 0, 2)
(1, 2, 0)
(2, 0, 1)
(2, 1, 0)