Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
again module re and it is longer and slower than it should be solution in Clear category for Long Repeat by samatdav02
import re
def long_repeat(line):
try:
return len(max([m.group() for m in re.finditer(r'(.)\1*', line)],key=len)) #division into groups with the same letters
except:
return 0 #if input is ""
July 22, 2019
Comments: