Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
2-liner re.finditer solution in Uncategorized category for Long Repeat by Stensen
import re
def long_repeat(t):
if not t or not[*re.finditer(r'([A-z])\1+', t)]: return [0, 1][bool(t) and not [*re.finditer(r'([A-z])\1+', t)]]
return max([len(i.group()) for i in re.finditer(r'([A-z])\1+', t)])
Sept. 23, 2020