def is_isomorphic(s, t):
if len(s) != len(t):<EOL><INDENT>return False<EOL><DEDENT>dict = {}<EOL>set_value = set()<EOL>for i in range(len(s)):<EOL><INDENT>if s[i] not in dict:<EOL><INDENT>if t[i] in set_value:<EOL><INDENT>return False<EOL><DEDENT>dict[s[i]] = t[i]<EOL>set_value.add(t[i])<EOL><DEDENT>else:<EOL><INDENT>if dict[s[i]] != t[i]:<EOL><INDENT>return False<EOL><DEDENT><DEDENT><DEDENT>return True<EOL>
:type s: str
:type t: str
:rtype: bool