Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Creative category for Long Non Repeat by Hashmore
non_repeat=lm=lambda l:l if len(l)==len(set(l)) else max(lm(l[:-1]),lm(l[1:]),key=len)
if __name__ == '__main__':
#These "asserts" using only for self-checking and not necessary for auto-testing
assert non_repeat('aaaaa') == 'a', "First"
assert non_repeat('abdjwawk') == 'abdjw', "Second"
assert non_repeat('abcabcffab') == 'abcf', "Third"
assert non_repeat('') == '', "Null"
print('"Run" is good. How is "Check"?')
Dec. 15, 2017