What is more 'pythonic' for 'not'
I have seen it both ways, but which way is more Pythonic? a = [1, 2, 3] # version 1 if not 4 in a: print 'is the not more pythonic?' # version 2 if 4 not in a: print 'this haz more engrish' Which way would be considered better Python? The second option is more Pythonic for two reasons: It is one operator, translating to one bytecode operand. The other line is really not (4 in a) ; two operators. As it happens, Python optimizes the latter case and translates not (x in y) into x not in y anyway, but that is an implementation detail of the CPython compiler. It is close to how you'd use the same