title: How to put string into table from a splitted line python
body: <p>I have a code that read a files and split each line, the object if if to put the two elements in a new table where each table element is composed by the two split element like this:</p>
  
  <pre><code>tab = [
      ('football', 'sport'),
      ('element!', 'pyhsics'),
      ('coefficient', 'math'),
      ....
  ]
  </code></pre>
  
  <p>my file is composed by lines, each line contain two element separated by a tab</p>
  
  <pre><code>sport   football
  Math    thermalization
  Process thermalization
  phsycis semi-classical methods
  Process nuclear reactions
  </code></pre>
  
  <p>my code is:</p>
  
  <pre><code>from codecs import open
  from contextlib import suppress
  import logging
  
  new_path = 'C:/learning/file'
  new_days = open(new_path,'w')
  
  div_texts = []
  tab= []
  
  
  with open("C:/learning/clea", "r", "utf-8") as f:
      lines = f.readlines()
      f.close()
  
  for line in lines:
      div_texts.append(line.strip().split("\t"))
  
  
  
  for i in range(len(div_texts)):
      try:
          new_days.write(div_texts[i][0])
          tab[i] = div_texts[i]
          print(tab[i])
          new_days.write("\n")
      except (UnicodeEncodeError,KeyError,IndexError):
          pass
  </code></pre>
  
  <p>here print(tab[i]) is not printing anything!</p>
  
  <p>thank you for your help</p>