Python: eval()
eval()
allows you to dynamically evaluate string based mathmatical expressions- NOTE:
eval()
is not safe if its input is not coming from a trusted source
eval("7+5") # 12 eval("7+5*2") # 17
eval()
eval()
allows you to dynamically evaluate string based mathmatical expressions
eval()
is not safe if its input is not coming from a trusted source
eval("7+5") # 12 eval("7+5*2") # 17