Question: In python point = [1,2,3] point2 = point At this time they are the same list, but point2 = point[] point.append(10) print (point) [1,2,3,10] but

In python

point = [1,2,3]

point2 = point

At this time they are the same list, but

point2 = point[]

point.append(10)

print (point) [1,2,3,10]

but point2 is still [1,2,3]

Why?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!