Find the Runner-Up Score!

  • + 1 comment

    You're doing a bit more work than you need to. Instead of iterating over a range, just iterate over the number list.

    raw_input()
    max = max2 = -101
    for n in map(int,raw_input().split()):
        if n > max2:
            if n > max:
                max,max2 = n,max
            elif n < max:
                max2 = n
    print(max2)