<qiyuangong>003_Longest_Substring_Without_Repeating_Characters_2.py
def lengthOfLongestSubstring( s):
    sls = len(set(s))
    ls = len(s)
    if ls >= 1:
        max_l = 1
    else:
        return 0
    for i in range(ls):
        for j in reversed(range(i + max_l + 1, i + sls + 1)):
            curr = s[i:j]
            c_ls = len(curr)
            if len(set(curr)) == c_ls:
                if c_ls > max_l:
                    max_l = c_ls
                    if max_l == sls:
                        return sls
                break
    return max_l
def sample_funcname ( var_0 ) :
    var_3 = len ( set ( var_0 ) )
    var_4 = len ( var_0 )
    if var_4 >= 1 :
        var_6 = 1
    else :
        return 0
    for var_9 in range ( var_4 ) :
        for var_11 in reversed ( range ( var_9 + var_6 + 1 , var_9 + var_3 + 1 ) ) :
            var_12 = var_0 [ var_9 : var_11 ]
            var_13 = len ( var_12 )
            if len ( set ( var_12 ) ) == var_13 :
                if var_13 > var_6 :
                    var_6 = var_13
                    if var_6 == var_3 :
                        return var_3
                break
    return var_6
