diff options
Diffstat (limited to 'challenge-245/eric-cheung/python/ch-1.py')
| -rwxr-xr-x | challenge-245/eric-cheung/python/ch-1.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/challenge-245/eric-cheung/python/ch-1.py b/challenge-245/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..35addf394d --- /dev/null +++ b/challenge-245/eric-cheung/python/ch-1.py @@ -0,0 +1,12 @@ +
+## Example 1
+## arrLang = ["perl", "c", "python"]
+## arrPopularity = [2, 1, 3]
+
+## Example 2
+arrLang = ["c++", "haskell", "java"]
+arrPopularity = [1, 3, 2]
+
+arrOutput = [arrLangLoop for arrPopularityLoop, arrLangLoop in sorted(zip(arrPopularity, arrLang))]
+
+print (arrOutput)
|
