aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubos Kolouch <lubos@kolouch.net>2019-09-29 10:04:24 +0200
committerLubos Kolouch <lubos@kolouch.net>2019-09-29 10:04:24 +0200
commitab19596cb9203bbc66ebcf8a07be29a26144b37c (patch)
treeecb441b57c85fd4a0fb92aefbc589be11e3b28e1
parent62a4ee40095accc6c18ed726eb633cfce7d5ca7e (diff)
downloadperlweeklychallenge-club-ab19596cb9203bbc66ebcf8a07be29a26144b37c.tar.gz
perlweeklychallenge-club-ab19596cb9203bbc66ebcf8a07be29a26144b37c.tar.bz2
perlweeklychallenge-club-ab19596cb9203bbc66ebcf8a07be29a26144b37c.zip
Put both files when I already added the Python folder...
-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)