Python tricks and tips
Section 3: Matrix
Lesson 11: Transposing a matrix
Code snippet to copy:
mat = [[8, 9, 10], [11, 12, 13]]
new_mat=zip(*mat)
for row in new_mat:
print(row)
Join @python_programming_resources for more
𝗘𝗡𝗝𝗢𝗬 𝗟𝗘𝗔𝗥𝗡𝗜𝗡𝗚👍👍
Post #230
339
