Exam PCAP All QuestionsBrowse all questions from this exam
Question 83

What is the expected behavior of the following code?

    Correct Answer: C

    C

Discussion
James_111Option: C

C: outputs list assignment index out of range. This is because my_list = [1, 2, 3] (# is positioned as 0,1,2) so having a [3] would need the list to me longer my_list=[1, 2, 3, 4]

Dav023Option: C

list assignment index out of range

macxszOption: C

C. it outputs list assignment index out of range