Answers for "how to split a python list into 4 evenly sized chunks"

-1

How do you split a list into evenly sized chunks?

def chunks(lst, n):
    """Yield successive n-sized chunks from lst."""
    for i in range(0, len(lst), n):
        yield lst[i:i + n]
Posted by: Guest on May-12-2021

Code answers related to "how to split a python list into 4 evenly sized chunks"

Python Answers by Framework

Browse Popular Code Answers by Language