Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
array1=[0,1,2] array2=array1 array2[0]=234234 print array1
出力:
[234234, 1, 2]
Python が「array1」を変更するのはなぜですか? array2を変更するだけではいけませんか?array2を変更したときにpythonがarray1を変更しないようにするにはどうすればよいですか?