Vidyalelo
Python · Q87

Python Lists MCQs: Exam Practice for List Concepts

Programming · Python · question 87

Q87

What will be the output of the following Python code? lst=[3,4,6,1,2] lst[1:2]=[7,8] print(lst)

A.
[3, 7, 8, 6, 1, 2]
Answer
B.
Syntax error
C.
[3,[7,8],6,1,2]
D.
[3,4,6,7,8]

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board