class Solution(object): def repeatedSubstringPattern(self, s): return True if re.match(r‘(\w+)\1+$‘, s) else False
Leetcode 459. Repeated Substring Pattern
原文:https://www.cnblogs.com/zywscq/p/10575881.html