From 394f42f8ff095bcee8bcb691eff12159acb4fc50 Mon Sep 17 00:00:00 2001 From: changgang Date: Fri, 15 Oct 2021 03:12:13 +0100 Subject: [PATCH] Function eval() in line 71 should be removed (#433) Function eval() calculate already the result before sending inputs to the switch (the calculation should be done by the switch) So, it should be removed. --- exercises/calc/calc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/calc/calc.py b/exercises/calc/calc.py index 505fa9e..5209c6b 100644 --- a/exercises/calc/calc.py +++ b/exercises/calc/calc.py @@ -68,7 +68,7 @@ def main(): iface = 'eth0' while True: - s = str(eval(input('> '))) + s = input('> ') if s == "quit": break print(s)