Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Long Repeat by robert.ciemny
def long_repeat(line):
counter=1
sub=1
if line=="":
return 0
for i in range(1,len(line)):
if line[i-1]==line[i]:
counter+=1
if counter>sub:
sub=counter
print(sub)
else:
counter=1
return sub
Oct. 23, 2017