Reoedering indexes in list of list

Chris Rebert clp2 at rebertia.com
Tue Sep 28 21:10:26 CEST 2010


On Tue, Sep 28, 2010 at 11:55 AM, Toto <emayssat at gmail.com> wrote:
> Hello,
>
> I have a list of list
> assume myList[x][y] is integer
> I would like to create an alias to that list which I could call this
> way:
> alias[y][x] returns myList[x][y]

If your "alias" can be read-only:
alias = zip(*myList)

Cheers,
Chris
--
http://blog.rebertia.com



More information about the Python-list mailing list