diff options
Diffstat (limited to 'challenge-244/eric-cheung/python/ch-1.py')
| -rwxr-xr-x | challenge-244/eric-cheung/python/ch-1.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/challenge-244/eric-cheung/python/ch-1.py b/challenge-244/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..0689b32341 --- /dev/null +++ b/challenge-244/eric-cheung/python/ch-1.py @@ -0,0 +1,8 @@ +
+## arrNum = [8, 1, 2, 2, 3] ## Example 1
+## arrNum = [6, 5, 4, 8] ## Example 2
+arrNum = [2, 2, 2] ## Example 3
+
+arrOutput = [sum(nLoop < nNumLoop for nLoop in arrNum) for nNumLoop in arrNum]
+
+print (arrOutput)
|
