Python provides

    -- the not operator, meaning logical negation
    -- the in operator, meaning membership

On the other hand, Python provides the not in operator meaning non-membership. However, it seems we can reformulate any "not in" expression using only "not" and "in" operation. For instance

>>> 'th' not in "python"
False
>>> not ('th' in "python")
False
>>>


So what is the usefulness of the "not in" operator ? Recall what Zen of Python tells

There should be one-- and preferably only one --obvious way to do it.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to