diff options
Diffstat (limited to 'challenge-240/eric-cheung/python/ch-2.py')
| -rwxr-xr-x | challenge-240/eric-cheung/python/ch-2.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/challenge-240/eric-cheung/python/ch-2.py b/challenge-240/eric-cheung/python/ch-2.py new file mode 100755 index 0000000000..409146c3f4 --- /dev/null +++ b/challenge-240/eric-cheung/python/ch-2.py @@ -0,0 +1,7 @@ +
+## arrInput = [0, 2, 1, 5, 3, 4] ## Example 1
+arrInput = [5, 0, 1, 2, 3, 4] ## Example 2
+
+arrOutput = [arrInput[arrInput[nIndx]] for nIndx in range(len(arrInput))]
+
+print (arrOutput)
|
