again module re and it is longer and slower than it should be solution in Clear category for Long Repeat by samatdav02
return len(max([m.group() for m in re.finditer(r'(.)\1*', line)],key=len)) #division into groups with the same letters
return 0 #if input is ""
July 22, 2019