I'm looking to fill a 3x3 matrix in the most pythonic way from a 1D list.
So transform from the first to the second
[1,2,3,4,5,6,7,8,9]
[ [1, 2, 3], [4, 5, 6], [7, 8, 9] ]
so far I can fill the first as such:
l = [1,2,3,4,5,6,7,8,9]
m = [[l[y] for y in range(3)] for x in range(3)]
but this gives
[['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']]