Hello friends.
I want to create a list of sublists
E.G.
i = 0
pack = []
list = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
while i < 17:
sublist = list[list[i]: list [i + 3]]
pack = pack + sublist
i += 1
print (pack)
the output is:
Type "copyright", "credits" or "license()" for more information.
================================ RESTART ================================
[0, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 7, 6, 7, 8, 7, 8, 9, 8, 9, 10, 9, 10, 11, 10, 11, 12, 11, 12, 13, 12, 13, 14, 13, 14, 15, 14, 15, 16, 15, 16, 17, 16, 17, 18]
and I expected[[0,1,2], [1,2,3] ...etc...]
What is the think that i have missed?