4 points · by jagtodeath · 6y ago · 1 comment
return re.compile(r'^1?$|^(11+)\1+$').match('1' * n) is None