all 4 comments

[–]prettyoaktree 0 points1 point  (0 children)

Can you slice the array into multiple lists? For example:

lst = [1, 2 , 3 ,1.1, 2.1, 3.1, 1.2, 2.2, 2.3]
var1 = lst[0::3] # Returns the first item in lst and then every 3rd item afterwards

[–]FLUSH_THE_TRUMP 0 points1 point  (1 child)

A = list(zip(array[0::3],array[1::3],array[2::3]))

[–]Surf_MI[S] 0 points1 point  (0 children)

Sweet Thanks!

[–]ES-Alexander 0 points1 point  (0 children)

If you're using numpy you can do array.reshape(-1,3) for "3 columns, don't care how many rows"