I am doing this simple thing, but I don't expect the right operand (apples
) to be modified when I modify the left operand(bananas
).
>> apples = [1,2,3,4,5]
>> bananas = apples
>> bananas.remove(3)
>> bananas
[1,2,4,5]
>> apples
[1,2,4,5]
apples
should be [1,2,3,4,5]
instead of [1,2,4,5]
.
Please comment on this.
Regards.