simple evaluate by python
• The function will only handle integer, with range from -2147483648 to 2147483647
• You do not need to handle overflow
• Supported operators “+ - x /” and “()”
• You should not use any 3rd party libraries or the eval() function in python
python evaluate.py “1 + 2 + 3”
6
python evaluate.py “3 * (4 + 3)”
21
python evaluate.py “3 * (4 + 3))”
Invalid expression!
python evaluate.py “1 + 2 3”
Invalid expression!