Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Long Repeat solution in Clear category for Long Repeat by CyrylWilczek
def long_repeat(line):
answer = 1
counter = 0
if line != '':
letter = line[0]
for characters in line:
if characters == letter:
counter += 1
if counter > answer:
answer = counter
if characters != letter:
counter = 1
letter = characters
return answer
return 0
Jan. 7, 2018