If you run this code, then both outputs are the same: ['A','B',' ',' ']
.
Don't know what I am doing wrong but shouldn't the output of array2
be blank: [' ',' ',' ',' ']
and array1
should be: ['A','B',' ',' ']
?
reset = [" "," "," "," "]
array1 = []
array2 = []
array1.append([" "," "," "," "])
array2 = array1
array1[0][0] = "A"
array1[0][1] = "B"
print (array1)
print (array2)