from itertools import permutations a=permutations ([1,2,3],2) for i in a: print(i)
from itertools import permutations a=permutations ([1,2,3]) for i in a: print(i)