<qiyuangong>205_Isomorphic_Strings_2.py
def isIsomorphic( s, t):
    if len(s) != len(t):
        return False
    ls = len(s)
    mapStoT = [0] * 127
    mapTtoS = [0] * 127
    for i in range(ls):
        s_num, t_num = ord(s[i]), ord(t[i])
        if mapStoT[s_num] == 0 and mapTtoS[t_num] == 0:
            mapStoT[s_num] = t_num
            mapTtoS[t_num] = s_num
        elif mapTtoS[t_num] != s_num or mapStoT[s_num] != t_num:
            return False
    return True
def sample_funcname ( var_0 , var_1 ) :
    if len ( var_0 ) != len ( var_1 ) :
        return False
    var_4 = len ( var_0 )
    var_7 = [ 0 ] * 127
    var_8 = [ 0 ] * 127
    for var_10 in range ( var_4 ) :
        var_12 , var_13 = ord ( var_0 [ var_10 ] ) , ord ( var_1 [ var_10 ] )
        if var_7 [ var_12 ] == 0 and var_8 [ var_13 ] == 0 :
            var_7 [ var_12 ] = var_13
            var_8 [ var_13 ] = var_12
        elif var_8 [ var_13 ] != var_12 or var_7 [ var_12 ] != var_13 :
            return False
    return True
