Answers for "Iterate over all cells of a 2D matrix List"

0

Iterate over all cells of a 2D matrix List

>>> from itertools import chain
>>> l = chain.from_iterable(zip(*l))
<itertools.chain object at 0x104612610>
>>> list(l)
['0,0', '1,0', '2,0', '0,1', '1,1', '2,1']
Posted by: Guest on March-27-2022

Code answers related to "Iterate over all cells of a 2D matrix List"

Browse Popular Code Answers by Language