samedi 26 octobre 2019

1 dimensional list to 2 dimensional list?

How can I convert this

list = [a, b, c, d, e, f, g, h, i]

to this

list = [[a, b, c], [d, e, f], [g, h, i]]

I want to separate the objects to groups of three in each.

Aucun commentaire:

Enregistrer un commentaire