I'm trying a create a random blank matrix in python 3 without using numpy. The Code looks perfect but when I change a single cell's value (for example Square1[0]) it changes all the Square1[x] values.
#!/usr/bin/env python3
# Creating a random n*n blank matrix
#for example 6*6
#I'll just create coloumns
def one():
square = []
for x in range(6):
square.append(None)
Square = []
for x in range(6):
Square.append(square)
return Square
#output is exactly what i want
print(one())
#but when i try to change a single value(cell),
a = one()
a[2][2] = "Error"
#it's bullshit
print(a)
What is wrong with me or my code?