+ 3

[Solved] Why is the output of the following code 'True'?

x = True is True or not False y = not x if x == True: x = not not not y is x elif x == False: x = y is False print(x)

29th Sep 2020, 3:05 AM
Rahul Hemdev
Rahul Hemdev - avatar
2 ответов
+ 2
x = (True is True) or not False x = True y = not x = not True = False x == True -> x = not not not y is x -> x = not not not False is True -> x = not not not False -> x = True
29th Sep 2020, 3:08 AM
你知道規則,我也是
你知道規則,我也是 - avatar
+ 3
CarrieForle Got it... Thanks!
29th Sep 2020, 3:10 AM
Rahul Hemdev
Rahul Hemdev - avatar