Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

c = [4,5,6] is creating a new list, and assigning it to c; not modifying the list that c pointed to. The '=' operator simply associates an object reference to a variable. Going d=c is copying the reference to an object from one variable to another.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: