Apr 14, 2021
from itertools import permutations
perm = list(permutations([1,2,3]))
Output:
[(1, 2, 3), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2), (3, 2, 1)]
Thanks Drew! :)
from itertools import permutations
perm = list(permutations([1,2,3]))
Output:
[(1, 2, 3), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2), (3, 2, 1)]
Thanks Drew! :)
AI Engineer. I write about AI | Tools| Data Science | Productivity. Subscribe to my Youtube channel: https://www.youtube.com/@automatalearninglab/videos