diff options
| author | 冯昶 <fengchang@novel-supertv.com> | 2023-12-04 15:09:23 +0800 |
|---|---|---|
| committer | 冯昶 <fengchang@novel-supertv.com> | 2023-12-04 15:09:23 +0800 |
| commit | 1b0f0c9cf0a1295b8bf9bef8d902f9a351120785 (patch) | |
| tree | 538dfb19ef0c66b56d4d743ed37868350b463a0f /challenge-245/eric-cheung/python/ch-1.py | |
| parent | 6f78aae3efa4642ffa271896203a09afce53e407 (diff) | |
| parent | b41848354dc1a09ae68e01e91b551a36d13f8bda (diff) | |
| download | perlweeklychallenge-club-1b0f0c9cf0a1295b8bf9bef8d902f9a351120785.tar.gz perlweeklychallenge-club-1b0f0c9cf0a1295b8bf9bef8d902f9a351120785.tar.bz2 perlweeklychallenge-club-1b0f0c9cf0a1295b8bf9bef8d902f9a351120785.zip | |
Merge remote-tracking branch 'upstream/master'
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)
|
