Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Adding a 0 in variable place in a list

I was expecting that the command

Z=[[141,163,127],[107,132,117],[85,116,120],[121,131,128]]
ZZ=[Z[i].insert(i,0) for i in range(len(Z))]

will insert a 0 in rank 'i' for each element of Z but it returns [None, None, None, None]. Need help Thanks