def is_one_edit(s, t):
if len(s) > len(t):<EOL><INDENT>return is_one_edit(t, s)<EOL><DEDENT>if len(t) - len(s) > <NUM_LIT:1> or t == s:<EOL><INDENT>return False<EOL><DEDENT>for i in range(len(s)):<EOL><INDENT>if s[i] != t[i]:<EOL><INDENT>return s[i+<NUM_LIT:1>:] == t[i+<NUM_LIT:1>:] or s[i:] == t[i+<NUM_LIT:1>:]<EOL><DEDENT><DEDENT>return True<EOL>
:type s: str
:type t: str
:rtype: bool