made it fit on one line :)
max_sequence = lambda arr :max([sum(arr)] + [sum(arr[j:j+i]) for i in range(len(arr)) for j in range(len(arr) - i + 1)])
def max_sequence(arr):# Code to find maximum sum of subarrayreturn max([sum(arr)] +[sum(arr[j:j+i]) for i in range(len(arr)) for j in range(len(arr) - i + 1)])- max_sequence = lambda arr :max([sum(arr)] + [sum(arr[j:j+i]) for i in range(len(arr)) for j in range(len(arr) - i + 1)])