My code is:
a = {"a1","a2","a3"}
b = a
b[1] = "b1"
print(a[1])
I can't understand why the result is "b1" instead of "a1".
The same is:
a = {"a1","a2","a3"}
b = a
c = b
b[1] = "b1"
c[2] = "c2"
print(a[1])
print(a[2])
print(a[3])
The result will be: "b1" "c2" "a3".
Can I copy variables in another way?