F
flyaflya
I want make a 2-D array from a list,all elements is references of
list's,like this:
a = [1,2,3,4]
b = [ [1,2], [3,4] ]
when change any elements of a, the elements of b will change too, so I
can use some function for list to change b.
c/c++ can work in this way,I think let b[0] = a[0:2], b[1] = a[2:3],but
it's not reference,it's copy.
list's,like this:
a = [1,2,3,4]
b = [ [1,2], [3,4] ]
when change any elements of a, the elements of b will change too, so I
can use some function for list to change b.
c/c++ can work in this way,I think let b[0] = a[0:2], b[1] = a[2:3],but
it's not reference,it's copy.