title: How to convert the empty string parsed from .txt file to None?
body: <pre><code>import os
  
  pwd1 = str()
  pwd2 = None
  pwd3 = ""
  pwd4 = " "
  
  print("1:%s" %pwd1)
  print("2:%s" %pwd3)
  print("3:%s" %pwd3)
  print("4:%s" %pwd4)
  </code></pre>
  
  <p>Test.txt file contents:</p>
  
  <pre class="lang-none prettyprint-override"><code>[Section1]
  username : testuser
  password : validpwd
  
  [Section2]
  username : testuser
  password : validpwd
  
  [Section3]
  username : testuser
  password : 
  
  [Section4]
  username : testuser
  password : validpwd
  </code></pre>
  
  <p><code>Section3</code> contains <code>password :</code> as empty line.</p>
  
  <p>I have parsed the value of the "password" field from <code>Section3</code>, and when I tried to print the "password" value, it prints as empty line in output. I need it to mention it as "None". How can I do that?</p>