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


Groups > comp.lang.python > #73198

Re: About python while statement and pop()

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 <vincent.vandevyvre@swing.be>
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 <vincent.vandevyvre@swing.be>
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 <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.11025.1402544865.18130.python-list@python.org> (permalink)
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

Show key headers only | View raw


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 <https://launchpad.net/oqapy> . Qarte 
<https://launchpad.net/qarte> . PaQager <https://launchpad.net/paqager>

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


Thread

About python while statement and pop() hito koto <hitokoto2014@gmail.com> - 2014-06-11 20:12 -0700
  Re:About python while statement and pop() Dave Angel <davea@davea.name> - 2014-06-11 22:34 -0500
  Re: About python while statement and pop() Vincent Vande Vyvre <vincent.vandevyvre@swing.be> - 2014-06-12 05:40 +0200
  Re: About python while statement and pop() Chris Angelico <rosuav@gmail.com> - 2014-06-12 13:58 +1000
    Re: About python while statement and pop() hito koto <hitokoto2014@gmail.com> - 2014-06-11 21:56 -0700
      Re: About python while statement and pop() Chris Angelico <rosuav@gmail.com> - 2014-06-12 15:08 +1000
      Re: About python while statement and pop() Steven D'Aprano <steve@pearwood.info> - 2014-06-12 05:43 +0000
        Re: About python while statement and pop() hito koto <hitokoto2014@gmail.com> - 2014-06-11 23:06 -0700
        Re: About python while statement and pop() hito koto <hitokoto2014@gmail.com> - 2014-06-12 00:13 -0700
        Re: About python while statement and pop() hito koto <hitokoto2014@gmail.com> - 2014-06-12 02:51 -0700
  Re: About python while statement and pop() Mark H Harris <harrismh777@gmail.com> - 2014-06-12 11:41 -0500
  Re: About python while statement and pop() Mark H Harris <harrismh777@gmail.com> - 2014-06-12 11:49 -0500
    Re: About python while statement and pop() Marko Rauhamaa <marko@pacujo.net> - 2014-06-12 19:55 +0300
      Re: About python while statement and pop() Mark H Harris <harrismh777@gmail.com> - 2014-06-12 12:07 -0500
    Re: About python while statement and pop() Chris Angelico <rosuav@gmail.com> - 2014-06-13 02:57 +1000
      Re: About python while statement and pop() Mark H Harris <harrismh777@gmail.com> - 2014-06-12 12:10 -0500
      Re: About python while statement and pop() Mark H Harris <harrismh777@gmail.com> - 2014-06-12 12:16 -0500
        Re: About python while statement and pop() wxjmfauth@gmail.com - 2014-06-12 11:37 -0700

csiph-web