Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.072 X-Spam-Evidence: '*H*': 0.86; '*S*': 0.00; 'rows': 0.09; 'am,': 0.12; 'cc:addr:python-list': 0.15; 'columns': 0.16; 'rows,': 0.16; 'subject:function': 0.16; 'wrote:': 0.16; 'wed,': 0.17; 'jan': 0.19; 'cc:no real name:2**0': 0.21; 'header:In-Reply-To:1': 0.22; 'cc:addr:gmail.com': 0.28; 'message-id:@mail.gmail.com': 0.28; 'cc:addr:python.org': 0.29; 'subject:?': 0.30; 'cc:2**2': 0.30; 'received:209.85.160.46': 0.35; 'received:mail- pw0-f46.google.com': 0.35; 'received:209.85.160': 0.35; 'received:google.com': 0.37; 'received:209.85': 0.38; 'think': 0.38; 'received:209': 0.39; 'subject:: ': 0.39; 'back,': 0.64; 'become': 0.69; 'brown': 0.80; '10:31': 0.84; 'swap': 0.84; 'original.': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=mM3Qy3P1H/Vo/AHXoYh7f6Mw+0iXRS5mI2rxphu0z5A=; b=GmkOKgl5zSLQxp0WB3gKTe0uOaSiZ12y1YTNHLWrucc0qm2QIhdK5CmAuUrMku/2O8 Qx9woEtzcT9xmy8nDhbr5n5u6hcuDAoNQ1oNNM/zXpMFuKOwjfwIjqBUn+VohilI8ZqW SSduFsOdRzOgvokPIgRo8ytHPlWhxVr1icl20= MIME-Version: 1.0 In-Reply-To: References: From: Devin Jeanpierre Date: Wed, 18 Jan 2012 11:15:49 -0500 Subject: Re: unzip function? To: Rodrick Brown Content-Type: text/plain; charset=UTF-8 Cc: Neal Becker , python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1326903394 news.xs4all.nl 6879 [2001:888:2000:d::a6]:44052 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:19091 On Wed, Jan 18, 2012 at 10:31 AM, Rodrick Brown 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