classSolution(object): deffindRepeatedDnaSequences(self, s): """ :type s: str :rtype: List[str] """ if len(s) <=10:return [] d = {} for i in range(0,len(s)-9): tmp = s[i:i+10] if tmp in d: d[tmp] += 1 else: d[tmp] = 1 res = [] for key in d.keys(): if d[key] >= 2: res.append(key) return res