Examveda

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]

B. Syntax error

C. [3,[7,8],6,1,2]

D. [3,4,6,7,8]

Answer: Option A


This Question Belongs to Python Program >> Lists In Python

Join The Discussion

Related Questions on Lists in Python