aboutsummaryrefslogtreecommitdiff
path: root/challenge-307/eric-cheung/python/ch-1.py
blob: 4929e89e497c6a5f2bb056f0d61c8c3bd3574c43 (plain)
1
2
3
4
5
6
7
8
9
10
## arrInts = [5, 2, 4, 3, 1]  ## Example 1
## arrInts = [1, 2, 1, 1, 3]  ## Example 2
arrInts = [3, 1, 3, 2, 3]  ## Example 3

arrSorted = sorted(arrInts)

arrOutput = [nIndx for nIndx, (nOrig, nSort) in enumerate(zip(arrInts, arrSorted)) if nOrig != nSort]

print (arrOutput)