(expression, value)
return retVal
Searches occurrences of value inside expression at 0-depth level
    regarding the parentheses
Searches occurrences of value inside expression at 0-depth level
    regarding the parentheses
Searches occurrences of value inside expression at 0 - depth level regarding the parentheses
def zeroDepthSearch(expression, value):
    """
    Searches occurrences of value inside expression at 0-depth level
    regarding the parentheses
    """

    retVal = []

    depth = 0
    for index in xrange(len(expression)):
        if expression[index] == '(':
            depth += 1
        elif expression[index] == ')':
            depth -= 1
        elif depth == 0 and expression[index:index + len(value)] == value:
            retVal.append(index)

    return retVal
def zeroDepthSearch ( expression , value ) : retVal = [ ] depth = 0 for index in xrange ( len ( expression ) ) : if expression [ index ] == '(' : depth += 1 elif expression [ index ] == ')' : depth -= 1 elif depth == 0 and expression [ index : index + len ( value ) ] == value : retVal . append ( index ) return retVal