aboutsummaryrefslogtreecommitdiff
path: root/challenge-278/eric-cheung/python/ch-1.py
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-278/eric-cheung/python/ch-1.py')
-rwxr-xr-xchallenge-278/eric-cheung/python/ch-1.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/challenge-278/eric-cheung/python/ch-1.py b/challenge-278/eric-cheung/python/ch-1.py
new file mode 100755
index 0000000000..5fd86d7d26
--- /dev/null
+++ b/challenge-278/eric-cheung/python/ch-1.py
@@ -0,0 +1,10 @@
+
+## strShuffle = "and2 Raku3 cousins5 Perl1 are4" ## Example 1
+## strShuffle = "guest6 Python1 most4 the3 popular5 is2 language7" ## Example 2
+strShuffle = "Challenge3 The1 Weekly2" ## Example 3
+
+arrSplit = sorted([[int(strLoop[-1]), strLoop[:-1]] for strLoop in strShuffle.split()])
+
+arrOrder = [strSortLoop for nSort, strSortLoop in arrSplit]
+
+print (" ".join(arrOrder))