Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'arguments': 0.05; 'pointer': 0.05; 'arguments.': 0.09; 'dict': 0.09; 'from:addr:python': 0.09; 'operator,': 0.09; 'wrote:': 0.14; '**,': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:name:mrab': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'received:84.92': 0.16; 'received:84.92.122': 0.16; 'received:84.92.122.60': 0.16; 'reply-to:addr:python-list': 0.16; 'subject: \n ': 0.16; 'subject:Out': 0.16; 'argument': 0.16; 'question.': 0.16; 'keyword': 0.19; 'header:In-Reply-To:1': 0.21; 'received:84': 0.25; 'function': 0.25; 'subject:?': 0.29; 'to:addr :python-list': 0.33; 'list': 0.33; 'example,': 0.35; 'header:User- Agent:1': 0.35; 'reply-to:addr:python.org': 0.35; 'subject:What': 0.35; 'for?': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Reply-To:1': 0.72; 'reply-to:no real name:2**0': 0.72; 'subject:\t': 0.93 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgsHAK2p903Unw4S/2dsb2JhbABSmA2ORneIdcBmhiQElh+LEQ Date: Tue, 14 Jun 2011 19:37:27 +0100 From: MRAB User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: python-list@python.org Subject: Re: What is the Most Efficient Way of Printing A Dict's Contents Out In Columns? References: <22011833-0833-4589-8326-909f4c57f1aa@a10g2000vbz.googlegroups.com> <312107af-ee77-42ff-a8c5-8c32bd2976cf@f11g2000vbx.googlegroups.com> In-Reply-To: <312107af-ee77-42ff-a8c5-8c32bd2976cf@f11g2000vbx.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: python-list@python.org 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: 12 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1308076649 news.xs4all.nl 49046 [::ffff:82.94.164.166]:34050 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:7627 On 14/06/2011 18:48, Zach Dziura wrote: [snip] > I just have one quick question. On the line where you have zip(*arr), > what is the * for? Is it like the pointer operator, such as with C? Or > is it exactly the pointer operator? > [snip] The * in the argument list of a function call unpacks the following list as arguments for the call, for example, zip(*[0, 1, 2]) becomes zip(0, 1, 2), so zip(*arr) becomes zip(arr[0], arr[1], ...). There's also **, which unpacks a dict as keyword arguments.