Examveda

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']

C. ['Bangalore', 'Mumbai', 'Delhi']

D. ['Bangalore', 'Mumbai', 'Hyderabad']

Answer: Option B


This Question Belongs to Python Program >> Lists In Python

Join The Discussion

Related Questions on Lists in Python