aboutsummaryrefslogtreecommitdiff
path: root/challenge-184/eric-cheung/python/ch-1.py
diff options
context:
space:
mode:
authorMohammad S Anwar <mohammad.anwar@yahoo.com>2022-09-26 08:52:36 +0100
committerMohammad S Anwar <mohammad.anwar@yahoo.com>2022-09-26 08:52:36 +0100
commited8b454a791ccbcd0b85ed0bd353680da5cdaee6 (patch)
treeba4df861d6796df1b8e9e24ef62a74aa8e586e4c /challenge-184/eric-cheung/python/ch-1.py
parent0db65395831d539073afee3e3afe76ecebb2057c (diff)
downloadperlweeklychallenge-club-ed8b454a791ccbcd0b85ed0bd353680da5cdaee6.tar.gz
perlweeklychallenge-club-ed8b454a791ccbcd0b85ed0bd353680da5cdaee6.tar.bz2
perlweeklychallenge-club-ed8b454a791ccbcd0b85ed0bd353680da5cdaee6.zip
- Added guest contributions by Eric Cheung.
Diffstat (limited to 'challenge-184/eric-cheung/python/ch-1.py')
-rwxr-xr-xchallenge-184/eric-cheung/python/ch-1.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/challenge-184/eric-cheung/python/ch-1.py b/challenge-184/eric-cheung/python/ch-1.py
new file mode 100755
index 0000000000..754ad3d82b
--- /dev/null
+++ b/challenge-184/eric-cheung/python/ch-1.py
@@ -0,0 +1,7 @@
+
+## arrInputList = ['ab1234', 'cd5678', 'ef1342'] ## Example 1
+arrInputList = ['pq1122', 'rs3334'] ## Example 2
+
+arrOuputList = [('0' + str(nIndx) if nIndx < 10 else str(nIndx)) + arrLoop[2:] for nIndx, arrLoop in enumerate(arrInputList)]
+
+print (arrOuputList)