题目:
题解:
class Solution:def isIsomorphic(self, s: str, t: str) -> bool:dicts = Counter(s)dictt = Counter(t) if list(dicts.values()) != list(dictt.values()):return Falsefor i in range(len(s)):inds = list(dicts.keys()).index(s[i])if list(dictt.keys())[inds] != t[i]:return Falsereturn True