title: python set empty string to null in list
body: <p>Can anyone tell me why my for/if statement at the bottom isn't setting empty strings in the list domaininfo to <code>None</code> ?</p>
  
  <pre><code>while True:
      line = proc.stdout.readline()
      domaininfo = line.split(',')
  
      if line!= '':
          Id = None
          fakedomain = domaininfo[1]
          A = domaininfo[2]
          AAAA = domaininfo[3]
          MX = domaininfo[4]
          NS = domaininfo[5]
          country = domaininfo[6]
          whois_created = domaininfo[7]
          whois_updated = domaininfo[8]
          SSDEEP = domaininfo[9]
  
          for item in domaininfo[1:]:
              if not item:
                  item = None
  </code></pre>
  
  <p>output is:</p>
  
  <pre><code>['blah.com', '1.1.1.1', '', 'mx1.somemxserver.com', 'ns2.somensserver.net', 'Spain', '', '', '\n']
  </code></pre>
  
  <p>Desired output: </p>
  
  <pre><code>['blah.com', '1.1.1.1', None, 'mx1.somemxserver.com', 'ns2.somensserver.net', 'Spain', None, None, '\n']
  </code></pre>