Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Double Substring by yynozk
def double_substring(line):
n = len(line)
subs = [len(line[b:e]) for b in range(n+1) for e in range(b+1, n+1) if line.find(line[b:e], e) >= 0]
return max(subs) if subs else 0
April 4, 2018