0
Can someone explain this output
x= [0,0,0] y=[1,1,1] b=x and y print(not b) my question is what exactly is happening under the hood. I knwo that b is taking the output of y, but I am not sure why instead of x? My next question is how to print True instead of False. I explain to myself that when not b, they mean 1,1,1 is true value, should be false but please let me know what do you think about my observations
1 Antwort
+ 3
Every list that is not empty, evaluates as True.
So both x and y are True.
So b is True.
So not b is False.