0
Explain how: if not True: print("1") elif not (1 + 1 == 3): print("2") Gives the output as 2
1 ответ
+ 2
The not operator inverts the value of a bool. not True is False, and not False is True.
not True is False, so we don't enter the if block.
not (1+1 == 3) is True (since (1+1 == 3) is False), so we enter the elif block and print 2.