Matrix transposition: Difference between revisions

Content deleted Content added
Line 391: Line 391:


=={{header|Python}}==
=={{header|Python}}==
#!/usr/bin/env python
<python> #!/usr/bin/env python
m=((1, 1, 1, 1),
m=((1, 1, 1, 1),
(2, 4, 8, 16),
(2, 4, 8, 16),
Line 397: Line 397:
(4, 16, 64, 256),
(4, 16, 64, 256),
(5, 25,125, 625));
(5, 25,125, 625));
print(zip(*m))
print(zip(*m))</python>
Output:
Output:
[(1, 2, 3, 4, 5),
[(1, 2, 3, 4, 5),