From ab19596cb9203bbc66ebcf8a07be29a26144b37c Mon Sep 17 00:00:00 2001 From: Lubos Kolouch Date: Sun, 29 Sep 2019 10:04:24 +0200 Subject: Put both files when I already added the Python folder... --- challenge-027/lubos-kolouch/python/ch27_2.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 challenge-027/lubos-kolouch/python/ch27_2.py 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) -- cgit