<qiyuangong>008_String_to_Integer(atoi)_2.py
def myAtoi( s):
    try:
        s = s.lstrip() + '$' 
        for i, ch in enumerate(s):
            if not (ch in '+-' or '0' <= ch <= '9'):
                result = int(s[:i])
                return -2 ** 31 if result < -2 ** 31 else 2 ** 31 - 1 if result > 2 ** 31 - 1 else result
    except:
        return 0
def sample_funcname ( var_0 ) :
    try :
        var_0 = var_0.lstrip ( ) + '$'
        for var_4 , var_5 in enumerate ( var_0 ) :
            if not ( var_5 in '+-' or '0' <= var_5 <= '9' ) :
                var_10 = int ( var_0 [ : var_4 ] )
                return - 2 ** 31 if var_10 < - 2 ** 31 else 2 ** 31 - 1 if var_10 > 2 ** 31 - 1 else var_10
    except :
        return 0
