classSolution: defcheckInclusion(self, s1, s2): slot1, slot2 = [0]*26, [0]*26 l1, l2 = len(s1), len(s2) for c in s1: slot1[ord(c)-97] += 1 for i inrange(l2): slot2[ord(s2[i])-97] += 1 if i >= l1: slot2[ord(s2[i-l1])-97] -= 1 if slot1 == slot2: returnTrue returnFalse