When testing for membership, we can use:
x not in y
Or alternatively:
not x in y
There can be many possible contexts for this expression depending on x
and y
. It could be for a substring check, list membership, dict key existence, for example.