I have this example:
a = [-10,10][True]
b = [-10,10][False]
print(a,b)# "10 -10"
I have this example:
a = [-10,10][True]
b = [-10,10][False]
print(a,b)# "10 -10"
Since bool
is a subclass of int
that's why True
acts like 1 and False
like 0