Received: by 10.180.75.197 with SMTP id e5mr3126040wiw.1.1350352547241; Mon, 15 Oct 2012 18:55:47 -0700 (PDT) Path: q10ni65138124wif.0!nntp.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.130.MISMATCH!xlned.com!feeder1.xlned.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.panservice.it!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-l...@python.org Delivered-To: python-l...@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'that?': 0.05; 'completeness': 0.07; '0),': 0.09; '3),': 0.09; '[0,': 0.09; 'received:155': 0.09; '1),': 0.16; '2),': 0.16; 'afterwards.': 0.16; 'disclaimers': 0.16; 'disclaimers,': 0.16; 'from:addr:jpmorgan.com': 0.16; 'received:155.180': 0.16; 'received:155.180.234': 0.16; 'received:159.53': 0.16; 'received:bankone.net': 0.16; 'received:exchad.jpmchase.net': 0.16; 'received:jpmchase.com': 0.16; 'received:jpmchase.net': 0.16; 'received:svr.bankone.net': 0.16; 'securities,': 0.16; 'subject:item': 0.16; 'tup': 0.16; 'url:disclosures': 0.16; 'url:jpmorgan': 0.16; 'wrote:': 0.17; 'element': 0.17; '>>>': 0.18; 'to:name:python-l...@python.org': 0.20; 'insert': 0.23; 'monday,': 0.23; 'seems': 0.23; 'received:169.254': 0.24; 'header :In-Reply-To:1': 0.25; 'skip:[ 10': 0.26; 'accuracy': 0.27; 'merge': 0.27; 'subject:list': 0.28; 'chris': 0.28; 'fine': 0.28; 'received:169': 0.29; 'to:addr:python-list': 0.33; 'list': 0.35; 'pm,': 0.35; 'subject:': 0.36; 'email addr:python.org': 0.36; 'charset:us-ascii': 0.36; 'october': 0.37; 'why': 0.37; 'item': 0.37; 'sent:': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'email name:python-list': 0.62; 'information,': 0.63; 'url:email': 0.63; 'legal': 0.65; 'subject': 0.66; 'purchase': 0.67; 'sale': 0.76; 'received:169.254.8': 0.84; 'subject:before': 0.84 X-DKIM: OpenDKIM Filter v2.1.3 sz2.jpmchase.com q98LFbPK020288 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpmorgan.com; s=smtpout; t=1349730938; bh=AsecytITY2y33hUteKlxZVgffCSuNsZ8SA/VQM3QP8Q=; h=From:To:Subject:Date:Message-ID:References:In-Reply-To: Content-Transfer-Encoding:MIME-Version:Content-Type; b=KMDZR6WkznvWH6FldMHRT+zvQuv5GqDBTwSBbyTGUQoJca2YqnLsdCL26Id+B5BLO 1Rkv5jJG0gfN9jPidTC4GKP/bACZkROakB9XX8fwrfuVTOQFC0KMfxxnKc274q4tMT FwNH9vKwBXTntisbH68e3F7xePxX+HURqKm38n8E= From: "Prasad, Ramit" To: "python-l...@python.org" Subject: RE: Insert item before each element of a list Thread-Topic: Insert item before each element of a list Thread-Index: AQHNpYtZle8qHWv1N0ey/Y1jw6exp5ewEvcAgAAHZID//84+UA== Date: Mon, 8 Oct 2012 21:15:27 +0000 References: <50733399.5040...@freenet.de> In-Reply-To: <50733399.5040...@freenet.de> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.67.79.47] MIME-Version: 1.0 X-DLP-FWD: Yes X-BeenThere: python-l...@python.org X-Mailman-Version: 2.1.15 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: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1349732214 news.xs4all.nl 6949 [2001:888:2000:d::a6]:60408 X-Complaints-To: ab...@xs4all.nl Bytes: 4979 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" Agon Hajdari wrote:=0D=0A> Sent: Monday, October 08, 2012 3:12 PM=0D=0A> To= : python-list@python=2Eorg=0D=0A> Subject: Re: Insert item before each elem= ent of a list=0D=0A> =0D=0A> On 10/08/2012 09:45 PM, Chris Kaynor wrote:=0D= =0A> > [('insertme', i) for i in x]=0D=0A> =0D=0A> This is not enough, you = have to merge it afterwards=2E=0D=0A=0D=0AWhy do you say that? It seems to = work just fine for me=2E=0D=0A=0D=0A>>> x=0D=0A[0, 1, 2, 3, 4]=0D=0A>>> [('= insertme', i) for i in x]=0D=0A[('insertme', 0), ('insertme', 1), ('insertm= e', 2), ('insertme', 3), ('insertme', 4)]=0D=0A=0D=0A> =0D=0A> y =3D [item = for tup in y for item in tup]=0D=0A> =0D=0A=0D=0AThis email is confidential= and subject to important disclaimers and=0D=0Aconditions including on offe= rs for the purchase or sale of=0D=0Asecurities, accuracy and completeness o= f information, viruses,=0D=0Aconfidentiality, legal privilege, and legal en= tity disclaimers,=0D=0Aavailable at http://www=2Ejpmorgan=2Ecom/pages/discl= osures/email=2E