I'm trying to create a list of lists, such that each inner list has 8 elements, in a python one-liner.
So far I have the following:
locations = [[alphabet.index(j) for j in test]]
That maps to one big list inside of a list:
[[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]]
But I want to split it up to be multiple inner lists, each 8 elements:
[[1,2,3,4,5,6,7,8],[9,10,11,12,13,14,15,16]]
Any idea how I can acheive this?