I have a list of numbers:
L = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
I found how to create a list of lists:
new_L = [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12]]
But that is not what I need. I need to create (x) times (y) list of lists. For example, as a 3 times 4 list of lists:
new_L_2 = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]
Or a 2*6 list of lists:
new_L_3 = [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12]]
How can I make it? Thanks in advance.