Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19091 > unrolled thread

Re: unzip function?

Started byDevin Jeanpierre <jeanpierreda@gmail.com>
First post2012-01-18 11:15 -0500
Last post2012-01-18 11:15 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: unzip function? Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-01-18 11:15 -0500

#19091 — Re: unzip function?

FromDevin Jeanpierre <jeanpierreda@gmail.com>
Date2012-01-18 11:15 -0500
SubjectRe: unzip function?
Message-ID<mailman.4839.1326903394.27778.python-list@python.org>
On Wed, Jan 18, 2012 at 10:31 AM, Rodrick Brown <rodrick.brown@gmail.com> wrote:
> Alec can you explain this behavior zip(*zipped)?

Here's one way to think about it: If A is a matrix, zip(*A) returns
the transpose of A. That is, the columns become rows, and the rows
become columns.

If you swap rows and columns, and then swap them back, you're left
with the original.

-- Devin

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web