Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a list of objects and I need to split the list evenly into chunks of 3.
grpSel = cmds.ls(sl = True)
chunk_size = 3
chunks = [grpSel[i+i + chunk_size] for i in range(0, len(grpSel), chunk_size)]
I'm getting an error saying 'list index out of range'.
Image attached as a reference
How can I fix this?
Thanks in advance
Solved! Go to Solution.