aboutsummaryrefslogtreecommitdiff
path: root/challenge-002/zapwai/python/ch-1.py
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-002/zapwai/python/ch-1.py')
-rw-r--r--challenge-002/zapwai/python/ch-1.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/challenge-002/zapwai/python/ch-1.py b/challenge-002/zapwai/python/ch-1.py
new file mode 100644
index 0000000000..45282edb47
--- /dev/null
+++ b/challenge-002/zapwai/python/ch-1.py
@@ -0,0 +1,14 @@
+x = "003407"
+num = []
+on = 0
+for c in list(x):
+ if c == "0":
+ if on:
+ num.append(c)
+ else:
+ continue
+ else:
+ on = 1
+ num.append(c)
+print("Input:", x)
+print("Output:",''.join(num))