title: How to find second runner up score?
body: <pre class="lang-py prettyprint-override"><code>n = int(input())
  arr = map(int, input().split())
  setA = set(arr)
  
  for x in setA:
      x.sorted()
      print(x)
  </code></pre>
  <h1>Here is the error that I am facing</h1>
  <pre class="lang-py prettyprint-override"><code>5
  9 8 7 4
  Traceback (most recent call last):
  
    File &quot;C:\Users\jnnim\OneDrive\Desktop\hacker rank\practice\untitled1.py&quot;, line 6, in &lt;module&gt;
      x.sorted()
  
  AttributeError: 'int' object has no attribute 'sorted'
  </code></pre>
  <h1>Requirements for the program</h1>
  <p>You are given n scores. Store them in a list and find the score of the runner-up.</p>
  <p>The first line contains n elements. The second line contains an array of integers each separated by a space.</p>
  <p>In this program for loop, I have tried that within <code>setA</code>, because we have to sort <code>setA</code>.</p>
  <p>I had made the array in set because it does not keeps duplicate element.</p>
  <ol start="6">
  <li><p>Finally when I have to find out the runner up score then I will call [-1] index and make it print as runner up score.</p>
  </li>
  <li><p>If you need to know more about question please comment, I will tell you anything you need.</p>
  </li>
  <li><p>Please help me solve this error in this program only within these lines. Don't give a full solution</p>
  </li>
  </ol>