How do I make a copy of a list, so I can edit the copy without affecting the original. Ex:
x = [1., 2., 3., 4.]
y = x
y[0] = 9.
The output is:
x: [9.0, 2.0, 3.0, 4.0]
y: [9.0, 2.0, 3.0, 4.0]
when I want x to be:
x: [1.0, 2.0, 3.0, 4.0]
So how do I make a copy of a variable while keeping the original unchanged?
Thanks in advance,
Eric