aboutsummaryrefslogtreecommitdiff
path: root/challenge-294/eric-cheung/python/ch-2.py
blob: 19ba9bdc1bc24c527b90fd9b042147d72cf37838 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
from itertools import permutations

## arrInput = [1, 2, 3]  ## Example 1
## arrInput = [2, 1, 3]  ## Example 2
arrInput = [3, 1, 2]  ## Example 3

arrPermList = [list(arrSet) for arrSet in list(permutations(arrInput))]

## print (arrPermList)

print (arrPermList[arrPermList.index(arrInput) + 1])