title: python still prints line if I specify for it to not do that
body: <p>I don't think the title really says what my problem is but I don't know how to formulate it.<br />
  Anyway, I am printing from a log file all lines then I remember the last line in a variable. I then use a for loop to again go trough the whole file, but I use the fact that it has the time at the beginning of every line to check if the time is bigger then the one from the last line I saved last time I printed all the lines.<br />
  Now we get to the problem I have. It still prints the last line even if I don't want it too.<br />
  That might be confusing so let me use the output</p>
  <pre class="lang-py prettyprint-override"><code>['16', '31', '18']
  [16:31:18] [Async Chat Thread - #121/INFO]: &lt;seba_www&gt; cat?
  # the above line is the last line it printed the first time it went trough all the lines
  # and I don't want to print it
  
  
  ['16', '31', '19']
  [16:31:19] [Async Chat Thread - #121/INFO]: &lt;seba_www&gt; wdasdww
  # the above line is the new line I want to be printed
  </code></pre>
  <p>I tried to fix it with a simple if statement:</p>
  <pre class="lang-py prettyprint-override"><code>if line != last_line: 
      print(line)
  </code></pre>
  <p>but it still prints it...</p>
  <p>It might be really messy but I'm gonna put the whole block of code here as well, maybe it will help:</p>
  <pre class="lang-py prettyprint-override"><code>for line in logs:
      print(line)
  
  while True:
      time.sleep(10)
      last_line = line
      
      s = last_line.split()
      s1 = s[0]
      if &quot;[&quot; in s1:
          d2 = split(s1)
  
          d = s1.find(&quot;[&quot;)
          del d2[d]
  
          d1 = s1.find(&quot;]&quot;)
          del d2[d1 -1]
  
          d2 = listToString(d2)
          lastLine_list = d2.split(':')
  
          logs = open(os.path.join(sys.path[0], 'latest1.log'))
  
          for line in logs:
              s = line.split()
              s1 = s[0]
              if &quot;[&quot; in s1:
                  d2 = split(s1)
                  
                  d = s1.find(&quot;[&quot;)
                  del d2[d]
                  
                  d1 = s1.find(&quot;]&quot;)
                  del d2[d1 - 1]
                  
                  d2 = listToString(d2)
                  d2list = d2.split(&quot;:&quot;)
  
                  print(d2list)
  
                  if line != last_line:
                      if d2list[0] &gt;= lastLine_list[0]:
                          if d2list[1] &gt;= lastLine_list[1]:
                              if d2list[2] &gt;= lastLine_list[2]:
                                  print(line)
                                  time.sleep(5)
      logs.close()
  </code></pre>