title: I'm having trouble understanding this code
body: <p>I'm new to python and trying to learn by practicing on hackerrank. I'm not understanding this list concept. This is the problem </p>
  
  <p><strong>Input Format:</strong></p>
  
  <p>The first line contains an integer, , the number of students. 
  The  subsequent lines describe each student over  lines; the first line contains a student's name, and the second line contains their grade.</p>
  
  <p><strong>Constraints</strong></p>
  
  <p>There will always be one or more students having the second lowest grade.</p>
  
  <p><strong>Output Format:</strong></p>
  
  <p>Print the name(s) of any student(s) having the second lowest grade in Physics; if there are multiple students, order their names alphabetically and print each one on a new line.</p>
  
  <p><strong>Sample Input 0:</strong></p>
  
  <pre class="lang-none prettyprint-override"><code>5
  
  Harry
  37.21
  Berry
  37.21
  Tina
  37.2
  Akriti
  41
  Harsh
  39
  </code></pre>
  
  <p><strong>Sample Output 0:</strong></p>
  
  <pre class="lang-none prettyprint-override"><code>Berry
  
  Harry
  </code></pre>
  
  <p><strong>Code</strong></p>
  
  <pre><code>from __future__ import print_function
  score_list = {}
  for _ in range(input()):
      name = raw_input()
      score = float(raw_input())
      if score in score_list:
          score_list[score].append(name)
      else:
          score_list[score] = [name]
  new_list = []
  for i in score_list:
       new_list.append([i, score_list[i]])
  new_list.sort()
  result = new_list[1][1]
  result.sort()
  print (*result, sep = "\n")
  </code></pre>
  
  <p>I'm not able to understand the "in" function here, doesn't <code>in</code> check for a value in the list, and so isn't <code>score_list</code> empty?</p>