My question is purely educationalal for myself but is not homework (heck I'm not even in school but this question seems like a prime target for those suggesting it is homework). Is there a difference between:
if 'value' not in data: ...
...and...
if not 'value' in data: ...
Based on my brief test, on the surface they seem to function the same. Is there a scenario where they yield different, opposing results? Is one faster than the other? Is one "more correct" than the other?
Reading and writing code, my preference is for the first version.
Thanks.