I have the following code in python:
gates=[16, 16, 24, 24, 24, 27, 32, 32, 32, 32, 32, 32, 40, 40, 40, 56, 56, 64, 96];
a=gates;
one=a[0];
b=a;
for i in range(0,len(a)):
b[i]=a[i]/one
Now, at the end of this, I get the following as the output of 'b', as expected:
>>> b
[1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 6]
But I expect that 'a' is unchanged.. but it has changed too.
>>> a
[1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 6]
And to my surprise, 'gates' has changed too!
>>> gates
[1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 6]
Any clues on how to retain 'a' and 'gates' intact? Thanks!