blender-studio/common/utils.py

8 lines
152 B
Python

# noqa: D100
def chunks(lst, n):
"""Yield successive n-sized chunks from lst."""
for i in range(0, len(lst), n):
yield lst[i : i + n]