Last active
May 26, 2019 10:58
-
-
Save Linus-Albertus/96c763fb062b4393bef61bc1a747d092 to your computer and use it in GitHub Desktop.
[transpose array] Transpose an 2d array #array #python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
original_array = [['a',1], ['b',2], ['c',3]] | |
transposed_array = zip(*original_array) | |
list(transposed_array) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment