<doocs>1422.Maximum Score After Splitting a String_1.py
def maxScore( s: str) -> int:
    ans = t = (s[0] == '0') + s[1:].count('1')
    for i in range(1, len(s) - 1):
        t += 1 if s[i] == '0' else -1
        ans = max(ans, t)
    return ans
def sample_funcname ( var_0 : str ) -> int :
    var_9 = var_3 = ( var_0 [ 0 ] == '0' ) + var_0 [ 1 : ].count ( '1' )
    for var_12 in range ( 1 , len ( var_0 ) - 1 ) :
        var_3 += 1 if var_0 [ var_12 ] == '0' else - 1
        var_9 = max ( var_9 , var_3 )
    return var_9
