title: Python Skip one or more lines in a text file
body: <p>I am trying to do something in Python2.7 and I would really appreciate any kind of help!!I have a txt file and I want to read each line and do some stuff with it (I haven't decided yet). Anyway, there are some lines that I don't want and I want to skip them and I don't know how to do it.I read about next() function, but I don't always know how many lines need to be skipped and I don't know exactly how to use next() eg.file.next() or next(iterator).
  To make myself clear, here is an example:</p>
  
  <pre><code> mytxt:
      line1
      line2
      line3
      line_to_be_skipped_1
      line_to_be_skipped_2
      line6
      line7
      line8
      line_to_be_skipped_3
      line9
  
  etc
  </code></pre>
  
  <p>and I am trying to do something like this:</p>
  
  <pre><code>if line=certain_condition:
      skip_this_line_and_the_next_one(s)_if_the_same_condition_applies_and_continue_to_the_next_line
  </code></pre>
  
  <p>Thank you in advance!!!</p>