What is the expected behavior of the following code?

What is the expected behavior of the following code?

A . it outputs error
B . it outputs list assignment index out of range
C . the code is erroneous and it will not execute
D . it outputs <class ‘ IndexError’ >

Answer: B

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments