If this is not first appearance of current character in str1 , then check if previous appearance mapped to same character of str2
elif map [ ord ( string1 [ i ] ) ] != string2 [ i ] : NEW_LINE INDENT return False NEW_LINE DEDENT return True NEW_LINE