zip() or what?
rtomes at ihug.co.nz
Thu Jul 3 06:23:04 CEST 2003
Many thanks to those that answered my questions about whitespace and ord()
being reverse of chr(). As well as the 2 things I asked about I learned
about 5 other useful things.
This I am trying to flip an array around so that the "subscripts" happen
in the opposite order and reading the docs I thought that zip() did this.
So I tried it like this:
and what I got was (removing the .0000000001s):
[([0.1, 0.2],), ([1.1, 1.2],), ([2.1, 2.2],)]
which is just my original array with an extra useless level in it.
What I really wanted was this:
So my question is how do I do that easily?
And what on earth is zip() doing?
Alternatively, is there a construct to get x[*][i] if you know what I mean?
More information about the Python-list