Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def chunks(l,n):
- for i in range(0,len(l),n):
- yield l[i:i+n]
- OldList=[111111,a,b,c,d,222222,a,b,c,333333,a,d,e,f]
- DesiredList=[[111111,a,b,c,d],[222222,a,b,c],[333333,a,d,e,f]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement