Skip to content

Instantly share code, notes, and snippets.

@beltiras
Created October 14, 2018 15:08
Show Gist options
  • Save beltiras/3fff76c6f8fc6132563c72a618807ae3 to your computer and use it in GitHub Desktop.
Save beltiras/3fff76c6f8fc6132563c72a618807ae3 to your computer and use it in GitHub Desktop.
def transpose(matrix):
result_matrix = []
for i in range(len(matrix[0])):
result_matrix.append([m[i] for m in matrix])
return result_matrix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment