Same shape of letters

Two strings are isomorphic if every character of the first can be replaced to get the second, with each character always mapping to the same character and no two characters mapping to the same one. Write isomorphic(s, t) for strings of equal length.

isomorphic("egg", "add")      ->  True
isomorphic("foo", "bar")      ->  False
isomorphic("paper", "title")  ->  True
isomorphic("ab", "aa")        ->  False

The point is to practise maintaining a mapping in both directions.

def isomorphic(s, t):
    ...