Function to find precedence of operators .
def precedence ( op ) : NEW_LINE INDENT if op == ' + ' or op == ' - ' : NEW_LINE INDENT return 1 NEW_LINE DEDENT if op == ' * ' or op == ' / ' : NEW_LINE INDENT return 2 NEW_LINE DEDENT return 0 NEW_LINE DEDENT