aboutsummaryrefslogtreecommitdiff
path: root/challenge-226/eric-cheung/python/ch-1.py
blob: bd083aa7f7b86ac9abc08e8d2563db74ffbf5a10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
## Example 1
## strInput = "lacelengh"
## arrIndices = [3, 2, 0, 5, 4, 8, 6, 7, 1]

## Example 2
strInput = "rulepark"
arrIndices = [4, 7, 3, 1, 0, 5, 2, 6]

strOutput = "".join([strInput[arrIndices.index(nLoop)] for nLoop in range(len(strInput))])

print (strOutput)