title: "add to set" returns a boolean in java - what about python?
body: <p>In Java I like to use the Boolean value returned by an "add to the set" operation to test whether the element was already present in the set:</p>
  
  <pre><code>if (set.add("x")) {
     print "x was not yet in the set";
  }
  </code></pre>
  
  <p>My question is, is there something as convenient in Python? I tried</p>
  
  <pre><code> z = set()
   if (z.add(y)):
       print something
  </code></pre>
  
  <p>But it does not print anything. Am I missing something? Thx!</p>