[Solved] How to print a list as list of list in particular order in Python?


Sorry but that day I didn’t know about slicing, sorry to bother,
here it is:
l=[1,2,3,4,5,6,7,8,9];l=[[l[i],l[i+1],l[i+2]] for i in range(0,9,3)];print(L)

solved How to print a list as list of list in particular order in Python?