+ 2
but why, not(print(4 not in nums)) is True. the first not should make it False. I thought not works like this too.
here nums=[3,5,6] say,
4 Réponses
+ 3
You evaluate the returning value of print(). print() always returns None, and None evaluates to False, so `not None` evaluates to True (try this: `if not None: print('x')`). Everything works as expected.
By the way, not is not a command, it's an operator. And print() is a function (there's a difference).
0
so not command don't work outside print command like this.
0
yes
0
thanks trueneu