Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment:
This is same as doing the below with list1 getting a reference of list2. Assignments in Python don't copy the value but make a reference. This is not an issue specific to IDLE as tagged and has the same behaviour under a normal REPL. https://docs.python.org/3/reference/expressions.html#evaluation-order >>> list2 = [] >>> list1 = list2 >>> id(list2) 4487803136 >>> id(list1) 4487803136 ---------- nosy: +xtreak _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38966> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com