From b60cb77fe463f9c97a8170868a2ff874554d5f41 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Tue, 28 Nov 2023 11:53:44 +0000 Subject: - Added solutions by PokGoPun. - Added solutions by Luca Ferrari. - Added solutions by Humberto Massa. - Added solutions by Niels van Dijke. - Added solutions by Peter Campbell Smith. - Added solutions by Dave Jacoby. - Added solutions by Thomas Kohler. - Added solutions by Peter Meszaros. - Added solutions by E. Choroba. - Added solutions by David Ferrone. - Added solutions by W. Luis Mochan. - Added solutions by Mariano Spadaccini. --- challenge-245/eric-cheung/python/ch-1.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 challenge-245/eric-cheung/python/ch-1.py (limited to 'challenge-245/eric-cheung/python/ch-1.py') 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) -- cgit