/ Published in: Python
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
mylist = range(150) nestedlist = [mylist[start:start + 20] for start in range(0, len(mylist), 20)]