This commit is contained in:
Sebastian Seedorf
2022-12-11 20:02:26 +01:00
parent 62525f9165
commit 75b03cf36a
2 changed files with 2 additions and 6 deletions

View File

@@ -9,9 +9,7 @@ def create_op(op_line):
if "old * old" in op_line:
return lambda x: x**2
val = int(op_line[6:])
if "*" in op_line:
return lambda x: x*val
return lambda x: x+val
return (lambda x: x*val) if "*" in op_line else (lambda x: x+val)
for line in lines: