Reoedering indexes in list of list

Toto emayssat at gmail.com
Tue Sep 28 15:29:23 EDT 2010


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

a=[['00','01'],['10','11']]
l=zip(*a)
print(l)
returns... [('00', '10'), ('01', '11')]
IS NOT AT ALL WHAT I WANT ;-)
What I want is
print a[1][0]
'10'
but print l[1][0]
'01'
notice the indexes of the list l are inverted...


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /