You are viewing a single comment's thread. Return to all comments →
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)
Seems like cookies are disabled on this browser, please enable them to open this website
Find the Runner-Up Score!
You are viewing a single comment's thread. Return to all comments →
You're doing a bit more work than you need to. Instead of iterating over a range, just iterate over the number list.