for v in seq:
    for l in result:
        if v == l[-1] + 1:
            l.append(v)
else:
    result.append([v])
return max(result, key=len)
In python, how does one efficiently find the largest consecutive set of numbers in a list that are not necessarily adjacent?