title: Can't delete all maximum elements in a list
body: <p>I'm super new to programming.
  I'm supposed to find the runner up score. My logic is sorting the list, deleting the maximum element(s) and printing the new maximum element.</p>
  <p>Here's what I've tried:</p>
  <pre><code>enter code here
  
  n = int(input())
  
  arr = list(map(int , input().split()))
  arr.sort()
  a=arr
  for i in range(len(a)-1):
   if a[i]==max(arr):
    del a[i]
   else:
    continue
  print(arr)
  </code></pre>
  <p>When I give n=5 and list elements [2,3,5,6,6] then my output is [2,3,5,6]. The other 6 isn't getting removed. I suspect that del is messing with the indexing of the list.
  Please do tell me where I've gone wrong, thank you.</p>