Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
GroupBy solution in Clear category for Long Repeat by PythonLearner
from itertools import groupby
def long_repeat(line):
return max(len(list(group)) for _, group in groupby(line)) if line else 0
June 9, 2018
Comments: