diff options
Diffstat (limited to 'challenge-329/eric-cheung/python/ch-1.py')
| -rwxr-xr-x | challenge-329/eric-cheung/python/ch-1.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/challenge-329/eric-cheung/python/ch-1.py b/challenge-329/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..1768c4c152 --- /dev/null +++ b/challenge-329/eric-cheung/python/ch-1.py @@ -0,0 +1,10 @@ +
+## strInput = "the1weekly2challenge2" ## Example 1
+## strInput = "go21od1lu5c7k" ## Example 2
+strInput = "4p3e2r1l" ## Example 3
+
+strOutput = "".join([charLoop if charLoop.isnumeric() else " " for charLoop in strInput])
+
+arrOutput = set([int(strNumLoop) for strNumLoop in strOutput.split(" ") if strNumLoop])
+
+print (arrOutput)
|
