unzip array of arrays?

Tobiah toby at tobiah.org
Thu Jan 22 23:04:15 CET 2009


Although it's trivial to program, I wondered whether
there was a builtin or particularly concise way to
express this idea:

> a = [(1, 2), (3, 4), (5, 6)]
> field[a, 2]
[2, 4, 6]

where field() is some made up function.

Thanks,

Toby



More information about the Python-list mailing list