title: print a previous line based on a condition in python
body: <p>I am trying to print -4th line based on a condition. I have a text file <code>SFU.txt</code> with some content. My objective is: if there is a word <code>configuration</code> in a line, I want to print -4th line. For example if the content of my file is like below:</p>
  
  <pre><code>This is a random text document
  We are talking about planets here
  This is planet Mars
  in solarsystem
  sun is the star
  this is 4th planet
  configuration lifeform exists
  bla bla bla
  bla bla bla
  </code></pre>
  
  <p>So, once the compiler hits the line <code>configuration lifeform exists</code> and it sees <code>configuration</code>, I want to print the line <code>This is planet earth</code></p>
  
  <p>My code below:</p>
  
  <pre><code>file = open("SFU.txt","r")
  for line in file:
      if "configuration" in line:
          #want to print the -4th line-HOW?
  </code></pre>