title: Use Python to read the LAST fifth line whose number of lines larger than 40000
body: <p>I use the following Python codes to read the last Third line from a text file. It has more than 40000 lines:</p>
  
  <pre><code>my_file1.close()
    with open (L[i],"r") as my_file3:
       for line in my_file3:
          if line.strip():
             count+=1
  count=count-5
  print (count)
  with open (L[i],"r") as my_file3:
     lines=my_file3.readlines()
       temp=lines[count].split()
       cpu[i]=temp[4]
          pht[i]=temp[1]
  </code></pre>
  
  <p>The IDLE told me "IndexError: list index out of range". Anyone can give me a favor?</p>