<qiyuangong>128_Longest_Consecutive_Sequence_1.py
def longestConsecutive( num):
    num = set(num)
    maxLen = 0
    while num:
        n = num.pop()
        i = n + 1
        l1 = 0
        l2 = 0
        while i in num:
            num.remove(i)
            i += 1
            l1 += 1
        i = n - 1
        while i in num:
            num.remove(i)
            i -= 1
            l2 += 1
        maxLen = max(maxLen, l1 + l2 + 1)
    return maxLen
def sample_funcname ( var_0 ) :
    var_0 = set ( var_0 )
    var_3 = 0
    while var_0 :
        var_5 = var_0.pop ( )
        var_7 = var_5 + 1
        var_8 = 0
        var_9 = 0
        while var_7 in var_0 :
            var_0.remove ( var_7 )
            var_7 += 1
            var_8 += 1
        var_7 = var_5 - 1
        while var_7 in var_0 :
            var_0.remove ( var_7 )
            var_7 -= 1
            var_9 += 1
        var_3 = max ( var_3 , var_8 + var_9 + 1 )
    return var_3
