+ 1
Why does this equal 5, from a python challenge
a=[4,5,6,7] Print(a[True] #output=5
3 ответов
+ 4
True = 1, False = 0,
a[True] equivalent to a[1]
That's how you got 5 as the output : )
+ 9
True is same 1
a[1] = 5
+ 1
Nice i didn't realize that it counted as 1 thanks guys