advanced code snippet search
magicrebirth on 12/22/09
list python list-comprehension
1 person have marked this snippet as a favorite
mylist = range(150) nestedlist = [mylist[start:start + 20] for start in range(0, len(mylist), 20)]
Report this snippet
You need to login to post a comment.