diff options
Diffstat (limited to 'challenge-308/eric-cheung/python/ch-1.py')
| -rwxr-xr-x | challenge-308/eric-cheung/python/ch-1.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/challenge-308/eric-cheung/python/ch-1.py b/challenge-308/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..e05d16d0b8 --- /dev/null +++ b/challenge-308/eric-cheung/python/ch-1.py @@ -0,0 +1,16 @@ +
+## Example 1
+## arrStr_01 = ["perl", "weekly", "challenge"]
+## arrStr_02 = ["raku", "weekly", "challenge"]
+
+## Example 2
+## arrStr_01 = ["perl", "raku", "python"]
+## arrStr_02 = ["python", "java"]
+
+## Example 3
+arrStr_01 = ["guest", "contribution"]
+arrStr_02 = ["fun", "weekly", "challenge"]
+
+arrCommon = [strLoop for strLoop in arrStr_01 if strLoop in arrStr_02]
+
+print (len(arrCommon))
|
