New to python here. I am working on a problem to write a script that gets user input in the form of a word problem such as “two plus three” and “seven minus five”, but returns a numerical value as the output. For example, if the user enters "two plus three" the output should be 5 (assuming the user only enters numbers 0-9 and operations plus, minus, times, and divided by).
I'm thinking I need to break apart the string into the numbers and the operation. Should I use .split? And how do I get the spelled-out number to process as a numerical value?