Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed2.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:launchpad': 0.05; 'subject:()': 0.09; 'subject:while': 0.09; 'def': 0.12; 'from:addr:swing.be': 0.16; 'from:addr:vincent.vandevyvre': 0.16; 'from:name:vincent vande vyvre': 0.16; 'message-id:@swing.be': 0.16; 'oqapy': 0.16; 'paqager': 0.16; 'received:mobistar.be': 0.16; 'url:oqapy': 0.16; 'url:paqager': 0.16; 'url:qarte': 0.16; 'v.v.': 0.16; 'subject:python': 0.16; 'header:User-Agent:1': 0.23; 'code:': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'statement': 0.30; "i'm": 0.30; 'subject:About': 0.31; 'something': 0.35; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'first': 0.61 Date: Thu, 12 Jun 2014 05:40:04 +0200 From: Vincent Vande Vyvre User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: About python while statement and pop() References: <8d6207ab-b883-4940-8e53-75546a91d4dd@googlegroups.com> In-Reply-To: <8d6207ab-b883-4940-8e53-75546a91d4dd@googlegroups.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1402544865 news.xs4all.nl 2849 [2001:888:2000:d::a6]:33200 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:73198 Le 12/06/2014 05:12, hito koto a écrit : > Hello,all > I'm first time, > > I want to make a while statement which can function the same x.pop () and without the use of pop、how can i to do? > > i want to change this is code: > > def foo(x): > y = [] > while x !=[]: > y.append(x.pop()) > return y Something like that : def foo(x): return reversed(x) -- Vincent V.V. Oqapy . Qarte . PaQager