Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '>>>': 0.12; '(2,': 0.16; '>what': 0.16; 'from:addr:tyler': 0.16; 'from:addr:tysdomain.com': 0.16; 'from:name:littlefield, tyler': 0.16; 'message- id:@tysdomain.com': 0.16; 'pythonic': 0.16; 'received:69.164': 0.16; 'received:69.164.206': 0.16; 'received:69.164.206.65': 0.16; 'received:tds-solutions.net': 0.16; 'reply-to:addr:tyler': 0.16; 'reply-to:addr:tysdomain.com': 0.16; 'subject:list': 0.22; 'header :In-Reply-To:1': 0.22; 'loop': 0.22; 'list': 0.30; 'to:addr :python-list': 0.32; 'received:192.168.1': 0.34; 'received:192': 0.34; 'header:User-Agent:1': 0.35; 'received:192.168': 0.37; 'returning': 0.39; 'to:addr:python.org': 0.39; 'how': 0.39; 'reply-to:no real name:2**0': 0.72; 'header:Reply-To:1': 0.72 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on wuff X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable version=3.3.1 Date: Mon, 25 Apr 2011 21:38:11 -0600 From: "Littlefield, Tyler" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: python-list@python.org Subject: Re: De-tupleizing a list References: <8dcab23b-6e38-41d0-9591-ef3cbfdbd589@a21g2000prj.googlegroups.com> In-Reply-To: <8dcab23b-6e38-41d0-9591-ef3cbfdbd589@a21g2000prj.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: tyler@tysdomain.com 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: 13 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1303789627 news.xs4all.nl 81474 [::ffff:82.94.164.166]:33496 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:4017 >What is the most Pythonic way to loop through the list returning a >list like this?: here's how I'd do it: >>> i [(1, 'a'), (2, 'b'), (3, 'c')] >>> for item in i: ... a+=list(item) ... ... >>> a [1, 'a', 2, 'b', 3, 'c']