Source Code:
(back to article)
import itertools my_list = [1, 2, 3] result = list(itertools.permutations(my_list,2)) print(result)
Result:
Report an issue