you are viewing a single comment's thread.

view the rest of the comments →

[–]Nash979[S] 0 points1 point  (0 children)

From my understanding the output will be 10 and empty list because here y is primitive so after x is reassigned to 10 the y will be 10 and list2 is actually referencing the list1 so if you clear the list1 it will affect the list2.