1class Solution(object):2 def wordPattern(self, pattern, s):3 """4 :type pattern: str5 :type s: str6 :rtype: bool7 """8 p, s = list(pattern), list(s.split(" "))910 return len(s) == len(p) and len(set(zip(p, s))) == len(set(s)) == len(set(p))
WPM •0 •0
ACC •0 •0
TIME •0