"x not in" vs. "not x in" [duplicate]
Python
This question already has answers here: "x not in y" or "not x in y" (6 answers) Closed 7 years ago.I've noticed that both of these work the same:
if x not in list and if not x in list.
Is there some sort of difference between the two in certain cases? Is there a reason for having both, or is it just because it's more natural for some people to write one or the other?
Which one am I more likely to see in other people's code?
Answer link : https://codehunter.cc/a/python/x-not-in-vs-not-x-in-duplicate
Posted May 4, 2022, 2:01 AM UTC
10