title: trying to return second lowest grade holders from the given series of inputs
body: <p>I am trying to find the second smallest grade holders from the input data.
  What is wrong with this code.</p>
  
  <pre><code>n = int(input())
  lis=[] 
  fin=[]
  fin2=[]
  for x in range(n):  #reading input data
      name=input()
      grade=float(input())
      lis.append([grade,name])
  lis=sorted(lis)
  
  for y in lis:      #finds second lowest grade holder
     if y &gt; min(lis):
          fin.append(y)
          y=lis.index(y)
      lis.pop(y)
          break
  
  for z in lis:     #finds all second lowest grade holders
     if z[0]==fin[0][0]:
         fin.append(z)
  
  
  for xx in fin:
      fin2.append(xx[1])
  
  
  fin2=sorted(fin2)
  for zz in fin2:
      print(zz)
  </code></pre>
  
  <p><strong>Input:</strong></p>
  
  <pre><code>5
  Harsh
  20
  Beria
  20
  Varun
  19
  Kakunami
  19
  Vikas
  21
  </code></pre>
  
  <p><strong>Output:</strong></p>
  
  <pre><code>Kakunami
  Varun
  </code></pre>
  
  <p>My Thinking :</p>
  
  <p>I think there might be something wrong at second for loop which find the 
        second smallest grade. The issue is stated by the output. I am reading the 
        inputs in a nested list ("lis"), sorting them and then moving the second 
        highest grade holder to another list( "fin" in this case ) and them 
        comparing elements of this list to all the elements of the previous list ( 
        "lis") and adding elements which are equal to the new list ("fin2") and printing their holder name in sorted order.</p>