Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
If expressions solution in Clear category for Long Repeat by Geeshta
def long_repeat(line):
longest = 0
current = 0
last = ""
for letter in line:
current = 1 if letter != last else current + 1
longest = current if current > longest else longest
last = letter
return longest
Oct. 10, 2019
Comments: