"x is not in y" versus "not x in y"

My question is pretty simple, and surprisingly I couldn't find an answer to it:

Is there any scenario in which x not in y

both not x in y

give different results?

How about a case where x

and / or y

are more complex expressions of some kind?

Could the occurrence of an operator cause each of the above expressions to produce a different result?

+3
python


source to share


No one has answered this question yet

See similar questions:

29
What is more "Python" for "not"

or similar:

2425
Least Surprise and Mutable Default Argument
873
Big data workflows using pandas
677
Detecting peaks in a 2D array
659
Python development path - from student to guru
543
Why is [] faster than list ()?
222
How to make good reproducible pandas examples
120
'and' (boolean) versus '&' (bitwise) - Why is there a difference in behavior with lists versus numpy arrays?
97
while (1) Vs. bye (true). Why the difference?
0
1 == 2 for large numbers 1
-1
Generator expressions versus output



All Articles
Loading...
X
Show
Funny
Dev
Pics