diff options
Diffstat (limited to 'challenge-228/eric-cheung/python/ch-1.py')
| -rwxr-xr-x | challenge-228/eric-cheung/python/ch-1.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/challenge-228/eric-cheung/python/ch-1.py b/challenge-228/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..ae4d0ec1d9 --- /dev/null +++ b/challenge-228/eric-cheung/python/ch-1.py @@ -0,0 +1,8 @@ +
+## arrInt = [2, 1, 3, 2] ## Example 1
+## arrInt = [1, 1, 1, 1] ## Example 2
+arrInt = [2, 1, 3, 4] ## Example 3
+
+arrUniqInt = [nLoop for nLoop in list(set(arrInt)) if arrInt.count(nLoop) == 1]
+
+print (sum(arrUniqInt))
|
