Use of eval
10 if len(parts) == 3 and parts[0] == "log":
11 print(math.log(int(parts[2]), int(parts[1])))
12 else:
13 print(eval(string))14 except (KeyboardInterrupt, EOFError):
15 print()
16 exit()
Description
Use of possibly insecure function - consider using safer ast.literal_eval
. Read more on why should eval
be avoided here.