Find the first distinct char and judge the rest of them.

```
class Solution(object):
def isOneEditDistance(self, s, t):
i = 0
while i < min(len(s), len(t)) and s[i] == t[i] :
i += 1
return not (i == len(s) == len(t)) and s[i + (len(s) >= len(t)):] == t[i + (len(s) <= len(t)):]
```