摘要:
class Solution(object): def strStr(self, haystack, needle): """ :type haystack: str :type needle: str :rtype: int """ return haystack.find(needle) ... 阅读全文
摘要:
class Solution(object): def repeatedSubstringPattern(self, s): return True if re.match(r'(\w+)\1+$', s) else False 阅读全文