Vidyalelo
Python · Q93

Python Lists MCQs: Exam Practice for List Concepts

Programming · Python · question 93

Q93

What will be the output of the following Python code? places = ['Bangalore', 'Mumbai', 'Delhi'] places1 = places places2 = places[:] places1[1]="Pune" places2[2]="Hyderabad" print(places)

A.
['Bangalore', 'Pune', 'Hyderabad']
B.
['Bangalore', 'Pune', 'Delhi']
Answer
C.
['Bangalore', 'Mumbai', 'Delhi']
D.
['Bangalore', 'Mumbai', 'Hyderabad']

Answer: Option B

Solution

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