S
S
sswwssww2021-07-12 00:49:01
Python
sswwssww, 2021-07-12 00:49:01

How to merge "columns" of a two-dimensional array?

There is an array:

how to make it:
?
The size of rows and columns can change dynamically (it is not known in advance, but the number of columns in each row is the same).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2021-07-12
@sswwssww

list(map(list, zip(*arr)))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question