title: Removing empty items from a list (Python)
body: <p>I'm reading a file in Python that isn't well formatted, values are separated by multiple spaces and some tabs too so the lists returned has a lot of empty items, how do I remove/avoid those?</p>
  
  <p>This is my current code:</p>
  
  <pre><code>import re
  
  f = open('myfile.txt','r') 
  
  for line in f.readlines(): 
      if re.search(r'\bDeposit', line):
          print line.split(' ')
  
  f.close()
  </code></pre>
  
  <p>Thanks</p>