I am quite new to programming. This is in relation to python. So the idea is to take an expression such as 3/5 or, at most, 3/5*2(at most two operators, note that the operat
Use the shlex and StringIO Python module. In Python 2.3+:
shlex
StringIO
>>> from StringIO import StringIO >>> import shlex >>> input = StringIO('3/4+5') >>> list(shlex.shlex(input)) ['3', '/', '4', '+', '5']