What is the output of the following code ?
p = [3, 4, 5][bool(0)] print(p)
3
4
5
TypeError
bool(0) results in False Then [3, 4, 5][False] is [3, 4, 5][0], which will result in 3 as output
bool(0)
[3, 4, 5][False]
[3, 4, 5][0]
Comment here: