y = [[0,0,0],
[0,0,0]]
p = [1,2,3,4,5,6]
y[0] = p[0,2]
y[1] = p[3,4]
Returns error
I want to assign values in p to y, how to do that?
The answer should be y = [[1,2,3],[4,5,6]]
Thank you very much!
y = [[0,0,0],
[0,0,0]]
p = [1,2,3,4,5,6]
y[0] = p[0,2]
y[1] = p[3,4]
Returns error
I want to assign values in p to y, how to do that?
The answer should be y = [[1,2,3],[4,5,6]]
Thank you very much!