def two_largest(sequence):
    first = second = 0
for item in sequence:
    if item > second:
        if item > first:
            first, second = item, first
else:
    second = item
return first, second
More pythonic way to find first two greatest value in a list in python