title: how compare a str object with None
body: <p>I have meet a problem, when I develop a web use python3+flask, when name has no in put, I am confused, the result is True in print</p>
  
  <pre><code>name = request.args.get('name')
  if name is not None:
      print('True')
  else:
      print('False')
  </code></pre>
  
  <p>I refer to python documents, "A is not B" means A and B is not same object.
  And I make the following test:</p>
  
  <pre><code>print(name) #None
  print(type(name)) #&lt;class "str"&gt;
  print(type(None)) #&lt;class "NoneType"&gt;
  </code></pre>
  
  <p>I found the answer, but when I use the following format</p>
  
  <pre><code>if name:
      print('True')
  else:
      print('False')
  </code></pre>
  
  <p>it prints True and print(name) I get None
  I have to write like the following:</p>
  
  <pre><code>if name != str(None):
      print('True')
  else:
      print('False')
  </code></pre>
  
  <p>I feel it a little uncomfortable when use it like this, how I can compare it in a elegant way.</p>