Please look at the code snippet below, I asked the question below
class SAMPLES:
x = np.zeros(10)
def __init__(self, k, value):
self.x[k] = value
a = SAMPLES(0, 9)
b = SAMPLES(0, 10)
print(a.x[0])
print(b.x[0])
OUTPUT:
10
10
But the output must be:
9
10
How should I solve this problem?