Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'operator': 0.03; 'from:addr:yahoo.co.uk': 0.04; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'language.': 0.14; '"python': 0.16; 'guess.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'spacing': 0.16; 'subject:sub': 0.16; 'prevent': 0.16; 'language': 0.16; 'wrote:': 0.18; 'thanks.': 0.20; 'header:User-Agent:1': 0.23; 'skip': 0.24; 'url:moin': 0.24; '(or': 0.24; 'question': 0.24; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'subject:list': 0.30; "i'm": 0.30; 'url:wiki': 0.31; 'extend': 0.32; 'subject:all': 0.32; 'url:python': 0.33; 'could': 0.34; 'problem': 0.35; 'common': 0.35; 'google': 0.35; 'keyword': 0.36; 'url:org': 0.36; 'to:addr:python-list': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'read': 0.60; 'above,': 0.60; 'flat': 0.60; 'first': 0.61; 'email addr:gmail.com': 0.63; 'our': 0.64; 'homework': 0.84; 'unaware': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: how to iterate all sub-element in a list Date: Fri, 31 Jan 2014 14:48:46 +0000 References: <412b4d42-acba-4609-bd6d-e4d5c32db035@googlegroups.com> <600f2d6b-8068-453c-b21f-b23d0b13ff62@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: host-78-146-2-7.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: <600f2d6b-8068-453c-b21f-b23d0b13ff62@googlegroups.com> X-BeenThere: python-list@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: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1391179741 news.xs4all.nl 2839 [2001:888:2000:d::a6]:54099 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:65121 On 31/01/2014 10:42, seaspeak@gmail.com wrote: > Skip Montanaro於 2014年1月31日星期五UTC+8下午6時29分27秒寫道: >> Google for "python flatten list." >> >> >> >> This question comes up frequently, though I'm not sure if that's >> >> because it's a common homework problem or because people are unaware >> >> of the += operator (or extend method) for lists, and so build >> >> lists-of-lists when they could just build them flat in the first >> >> place. >> >> >> >> Skip > thanks. a keyword is all I need. > It is not homework. It is a common problem I guess. > I'm pleased to see that you have answers. In return would you please read and action this https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing the double line spacing above, thanks. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence