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


Groups > comp.lang.python > #10988

Re: how to separate a list into two lists?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <drobinow@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.032
X-Spam-Evidence '*H*': 0.94; '*S*': 0.00; 'subject:two': 0.07; 'l1,': 0.16; 'quite.': 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; 'message-id:@mail.gmail.com': 0.29; 'subject:?': 0.31; 'received:209.85.161.46': 0.31; 'received:mail- fx0-f46.google.com': 0.31; 'to:addr:python-list': 0.33; '???': 0.34; 'received:209.85.161': 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
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; bh=i7A2yWhcl95UtVyX/8+xYLhLK3pnOqly1gtsNLYHr3Y=; b=V6QzeSzu45f5CLWtk0V8/UJeYRH8AgBT8Z1MuNwcKJKw351WwI+c1E0Hj0D14JKvGA PzP/OXO0F7OQFIOMfpoREfFBvP6d4mwToa3127kfoVT8vKnUB8nw7VDbwa5yWa23WIm/ BZV0ZCCbVA2nmtcCykB39oBIIdR5DtcH3E1+0=
MIME-Version 1.0
In-Reply-To <CAOiUTY+TN9KosabE1vpgwr19BtSavUCBfqc=keBbGGyPCcxTTw@mail.gmail.com>
References <CAN1Fwxcdtt0u_TT=civMes1hA2qvfkH2YckES7B7qRE++DXzJQ@mail.gmail.com> <CAPTjJmo41CsrJwmVKXspeLuJ-ZPBKQOomXfesEFSpP5QkyHPAQ@mail.gmail.com> <CAOiUTY+TN9KosabE1vpgwr19BtSavUCBfqc=keBbGGyPCcxTTw@mail.gmail.com>
Date Sat, 6 Aug 2011 16:53:42 -0400
Subject Re: how to separate a list into two lists?
From David Robinow <drobinow@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
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.1998.1312664023.1164.python-list@python.org> (permalink)
Lines 10
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1312664023 news.xs4all.nl 23841 [2001:888:2000:d::a6]:38455
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:10988

Show key headers only | View raw


On Sat, Aug 6, 2011 at 1:23 PM, Kabie <kabie2011@gmail.com> wrote:
> No.
> L1, L2 = zip(*L)

Not quite. That makes L1 & L2 tuples.

L1, L2 = zip(*L)
L1 = list(L1)
L2 = list(L2)
???

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


Thread

Re: how to separate a list into two lists? David Robinow <drobinow@gmail.com> - 2011-08-06 16:53 -0400

csiph-web