aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-027/lubos-kolouch/python/ch27_2.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/challenge-027/lubos-kolouch/python/ch27_2.py b/challenge-027/lubos-kolouch/python/ch27_2.py
new file mode 100644
index 0000000000..2eaa72cf07
--- /dev/null
+++ b/challenge-027/lubos-kolouch/python/ch27_2.py
@@ -0,0 +1,13 @@
+#! python3
+
+import sys
+
+what = 'x=10;x+=20;x-=5'
+
+history = []
+
+for a in what.split(";"):
+ exec(a)
+ history.append(x)
+
+print(history)