title: how to delete the first and third column from a text file in python
body: <p>So I want to delete the first and third column of this text file my text file Looks like this:</p>
  
  <pre><code>1   2   3
  4   5   6
  </code></pre>
  
  <p>And I want to delete the first column and third column with python.</p>
  
  <p>My Code Looks like this:</p>
  
  <pre><code>f = open("5.txt", "r")
  g = open("datafile_fixed.txt", "w")
  
  for line in f:
      if line.strip():
          g.write("\t".join(line.split()[1:]) + "\n")
  
  f.close()
  g.close()
  </code></pre>
  
  <p>but I can only delete the first column. How do I delete the first and third?</p>