Doug Moen
06/07/2019, 1:26 PM>>> a=[1,2,3]
>>> b=a
>>> a[0]=17
>>> b
[17, 2, 3]
I think it is unnatural for the value of b
to change when I modify a
. I've seen lots of evidence on the internet that this is a source of confusion for novice programmers who are encountering Python for the first time.Kartik Agaram
fyr
06/08/2019, 12:26 AMDoug Moen
06/08/2019, 1:19 AMwtaysom
06/08/2019, 7:08 AMDoug Moen
06/09/2019, 3:42 PM