Simply use "eval", but unsafe.
I am trying to take a piece of user input: 5+5 or 5*5 but my code receives it as a string. I want to convert it to an expression from which an answer can be deduced. However, I am not sure how to do this.
Is there a way for python to take in a string with math operators and convert it to an expression?