I'm coming from a JavaScript background and this might be why lists in Python feel a bit weird to me. Can someone explain to me how this piece of code works and how i'm getting this to work the way i want?
a = [0,0]
b = a
a[0] = a[0]+1 #somehow manipulates b as well
print a #i want this line to return [1,0]
print b #i want this line to return [0,0], not [1,0]
I know there are lists and tuples (which are immutable), but this knowledge somehow didn't help me any further.
Help is appreciated. :)