Leetcode 459. Repeated Substring Pattern
class Solution(object): def repeatedSubstringPattern(self, s): return True if re.match(r'(\w+)\1+$', s) else False
class Solution(object): def repeatedSubstringPattern(self, s): return True if re.match(r'(\w+)\1+$', s) else False