Q. What is the output of the following code?
Code:
try:
list = 2*[0]+2*[5]
x = list[2]
print('OK!')
except IndexError:
print('Block Except!')
else:
print('Block Else!')
finally:
print('Block Finally!')
β
Correct Answer: (D)
All the answers are true
Explanation: Output:
OK!
Block Else!
Block Finally!