So I am trying to delete elements from an array and do some calculations with this array. The thing is, I want to still keep a copy of the original array, so I made a new array and assigned it the values of the original array. The thing is, whenever I print out the length of the original and the new array, it gives me the same length, but it gives me the length of the new array. How do I make a new array with the same values as 'a', but without changing 'a'
a = [2, 4, 5, 7, 8, 9]
b = []
b = a
for _ in range(2):
m = min(b)
b[:] = (x for x in b if x != m)
print(len(b))
print(len(a))