Python How Do I Split A List Into

[Solved] Python How Do I Split A List Into | Perl - Code Explorer | yomemimo.com
Question : split into list into even chunks

Answered by : tender-toucan-cf32s9kwijxl

def chunks(l, n): n = max(1, n) return (l[i:i+n] for i in range(0, len(l), n))

Source : https://stackoverflow.com/questions/312443/how-do-you-split-a-list-into-evenly-sized-chunks | Last Update : Sat, 05 Jun 21

Answers related to python how do i split a list into equally sized chunks

Code Explorer Popular Question For Perl