(expression)
return result
Return array of parsed tokens in the expression

    expression String: Math expression to parse in infix notation
Return array of parsed tokens in the expression
Return array of parsed tokens in the expression
def parse(expression):
    """
    Return array of parsed tokens in the expression

    expression String: Math expression to parse in infix notation
    """
    result = []
    current = ""
    for i in expression:
        if i.isdigit() or i == '.':
            current += i
        else:
            if len(current) > 0:
                result.append(current)
                current = ""
            if i in __operators__ or i in __parenthesis__:
                result.append(i)
            else:
                raise Exception("invalid syntax " + i)

    if len(current) > 0:
        result.append(current)
    return result
def parse ( expression ) : result = [ ] current = "" for i in expression : if i . isdigit ( ) or i == '.' : current += i else : if len ( current ) > 0 : result . append ( current ) current = "" if i in __operators__ or i in __parenthesis__ : result . append ( i ) else : raise Exception ( "invalid syntax " + i ) if len ( current ) > 0 : result . append ( current ) return result