title: how to write IS NOT for str.endswith in python
body: <p>How to write something like <code>!(str.endswith())</code> in python
  I mean I want to check if string IS NOT ending with something.
  My code is</p>
  
  <pre><code>if text == text. upper():   and text.endswith("."):
  </code></pre>
  
  <p>But I want to put IS NOT after and
  writing </p>
  
  <pre><code>if text == text. upper():   and not text.endswith("."):
  </code></pre>
  
  <p>or </p>
  
  <pre><code>if text == text. upper():   and not(text.endswith(".")):
  </code></pre>
  
  <p>gives me <strong>Invalid syntax</strong></p>