I don't get it why here the result is [[0 0] [0 0]]; Here is the code:
def create_table(m,n):
t=[]
one_line=[]
for i in range(0,m):
one_line.append(0)
for i in range(0,n):
t.append(one_line)
return t
print(create_table(2,2));
After first iteration in one_line we have [0] and in t [[0]].
After the second iteration, where i=2 we have one_line = [0 0] and in t = [[0 0] [0 0]]. But why is not t=[[0] [0 0]] because the previous t was [[0]] not [[0 0] [0 0]].
Any explanation?