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


Groups > comp.lang.python > #10983

Re: how to separate a list into two lists?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news2.arglkargh.de!news.wiretrip.org!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.012
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'args': 0.05; 'subject:two': 0.07; 'python': 0.08; 'def': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.16; 'subject:list': 0.18; 'header:In-Reply-To:1': 0.22; 'pm,': 0.24; 'aug': 0.24; 'sat,': 0.28; 'forgot': 0.29; 'message-id:@mail.gmail.com': 0.29; 'arguments.': 0.30; 'subject:?': 0.31; 'list': 0.32; 'to:addr:python-list': 0.33; "i'll": 0.34; 'list.': 0.35; 'subject:lists': 0.36; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.39; 'to:addr:python.org': 0.39; "it's": 0.40; 'reference?': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=YgLjegMmYNsrB9pmVNSz9kAT4wepaaI7z1r7NyqhrIw=; b=Gyu5Dq9Idj8d72y16LtRIW8CyHGHnV1Ujn7hUX4VO/vTt2LFsrwmvQJEaBJfhYGmuO vj6eFV+YfMq70M0xY2FG1xA3R20qfsITCfWBe219Ipn4Lhk984ms31xUUakkInPrKI2L +OlURRRS6DG7AZxsSyK7TGOxgLCt/etiL8Spc=
MIME-Version 1.0
In-Reply-To <4e3d8634$0$5872$c3e8da3$12bcf670@news.astraweb.com>
References <CAN1Fwxcdtt0u_TT=civMes1hA2qvfkH2YckES7B7qRE++DXzJQ@mail.gmail.com> <mailman.1986.1312651348.1164.python-list@python.org> <4e3d8634$0$5872$c3e8da3$12bcf670@news.astraweb.com>
Date Sat, 6 Aug 2011 19:35:53 +0100
Subject Re: how to separate a list into two lists?
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1990.1312655755.1164.python-list@python.org> (permalink)
Lines 13
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1312655755 news.xs4all.nl 23929 [2001:888:2000:d::a6]:54870
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:10983

Show key headers only | View raw


On Sat, Aug 6, 2011 at 7:21 PM, bud <only@fleshwound.org> wrote:
> Nice. :)  I forgot about zip, still learning Python myself.
>
> I'll have to check up on the *L - is that a reference?
> I

It expands the list into the arguments. It's the parallel to:

def func(*args):

which collapses the args into a list.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: how to separate a list into two lists? Emile van Sebille <emile@fenx.com> - 2011-08-06 10:24 -0700
  Re: how to separate a list into two lists? bud <only@fleshwound.org> - 2011-08-06 18:21 +0000
    Re: how to separate a list into two lists? Chris Angelico <rosuav@gmail.com> - 2011-08-06 19:35 +0100
    Re: how to separate a list into two lists? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-08-07 10:13 +1000

csiph-web