Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
elegant solution with RegExp solution in Uncategorized category for Long Repeat by RomanTT
import re
def long_repeat(line):
i = 0
while True:
pattern = r'(.)\1{'+str(i)+'}'
if re.search(pattern,line):
i+=1
else:
break
return i
Oct. 9, 2018