title: How to find second largest number in a list?
body: <p>So I have to find the second largest number from list. I am doing it through simple loops.</p>
  
  <p>My approach is to divide a list into two parts and then find the largest number into two parts and then compare two numbers. I will choose the smaller number from two of them.  I can not use ready functions or different approaches. </p>
  
  <p>Basically, this is my code. But it does not run correctly</p>
  
  <pre><code>#!/usr/local/bin/python2.7
  
  alist=[-45,0,3,10,90,5,-2,4,18,45,100,1,-266,706]
  largest=alist[0]
  h=len(alist)/2 
  m=len(alist)-h
  
  print(alist)
  
  for i in alist:
      if alist[h]&gt;largest:
        largest=alist[h]
        i=i+1
  print(largest)
  </code></pre>