title: Find second maximum number in a list
body: <p>First line contains N. Second line contains list of N integers each separated by a space. I need to find the second largest number in list.</p>
  <p>My code:</p>
  <pre><code>N = int(raw_input())
  L = map(int, raw_input().split())
  
  for i in L:
      if i == max(L):
          L.remove(i)
  print L
  print max(L)
         
  </code></pre>
  <p>If input is <code>[2, 6, 9, 9, 5]</code>, this still prints maximum value: 9, as only one 9 is getting removed from the list.</p>
  <p>So, how to remove all the 1st maximum values in the list?</p>