Here is what I have:
mylist = [1, 2, 7, 11, 8, 55, 89, 1, 3, 8]
How can I get this broken down by 5 to the list of lists.
The desired outcome is:
[[1, 2, 7, 11, 8], [2, 7, 11, 8, 55], [7, 11, 8, 55, 89],[11, 8, 55, 89, 1], [8, 55, 89, 1, 3], [55, 89, 1, 3, 8]]
Here is what I've tried:
indices = [0,1,2]
for i in indices:
new.append(mylist [i])
indices = [x+1 for x in indices]
print(indices)
Thank you in advance.