Displaying a list of items vertically in a table instead of horizonally
Posted
by MichaelMM
on Stack Overflow
See other posts from Stack Overflow
or by MichaelMM
Published on 2010-03-22T19:18:41Z
Indexed on
2010/03/22
19:21 UTC
Read the original article
Hit count: 167
I have a list of items sorted alphabetically:
list = [a,b,c,d,e,f,g,h,i,j]
I'm able to output the list in an html table horizonally like so:
| a , b , c , d |
| e , f , g , h |
| i , j , , |
What's the algorithm to create the table vertically like this:
| a , d , g , j |
| b , e , h , |
| c , f , i , |
I'm using python, but your answer can be in any language or even pseudocode.
Thanks
© Stack Overflow or respective owner