I have a list like :
L = [11, 15, 18, 20, 22, 25, 30, 35, 40]
of 9 elements. I would like to feed each value to the (ij)th position of a 3 by 3 matrix like
00 01 02
10 11 12
20 21 22
That is 11 should go to (00)th position, 15 should go to (01)th position, 18 should go to (02)th position, 20 should go to (10)th position and so on.
Please suggest me the most efficient way to achieve this using for loop. Because I am writing an YT (http://yt-project.org/) YT data analysis code. YT is a Python package for analyzing astrophysical data.
Inside my code there is a line
axes = axes[i][j]
I want to feed first value in the list to
pf = load(L[0])
when ij is 00 then second value in the list to
pf = load(L[1])
when ij is 01 and so on... Please suggest me the most efficient way to achieve that? thank you