import itertools arr = ['A', 'B', 'C'] answer = itertools.permutations(arr, 3) print(list(answer))
To embed this project on your website, copy the following code and paste it into your website's HTML: