How to split a list in a list of x lists in python ?
Exemple with list splited in 2 lists:
elements = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
-> ([0, 1, 2, 3, 4], [5, 6, 7, 8, 9])
Exemple with list splited in 3 lists (note the third list of tuple, containing "division rest"):
elements = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
-> ([0, 1, 2], [3, 4, 5], [6, 7, 8, 9])
etc ...