Re: Python equivalent for perl's "next"-statement?

Discussion in 'Python' started by Dave Brueck, Oct 22, 2003.

  1. Dave Brueck

    Dave Brueck Guest

    > does anyone know an equivalent python statement for perl's
    > "next"-statement?
    > (Perl's "next" skips a loop cycle and continues with the next loop
    > cycle - it does not abort the whole loop).


    "continue"?

    >>> for i in range(5):

    .... if i == 3:
    .... continue
    .... print i
    ....
    0
    1
    2
    4

    -Dave
    Dave Brueck, Oct 22, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric Wichterich
    Replies:
    0
    Views:
    355
    Eric Wichterich
    Oct 22, 2003
  2. =?ISO-8859-1?Q?Gerhard_H=E4ring?=

    Re: Python equivalent for perl's "next"-statement?

    =?ISO-8859-1?Q?Gerhard_H=E4ring?=, Oct 22, 2003, in forum: Python
    Replies:
    5
    Views:
    3,070
    John J. Lee
    Oct 23, 2003
  3. Deniz Bahar
    Replies:
    2
    Views:
    446
    Andrey Tarasevich
    Mar 9, 2005
  4. =?ISO-8859-2?Q?Miros=B3aw?= Makowiecki

    Reading of file by next of map file and by next of file descriptor.

    =?ISO-8859-2?Q?Miros=B3aw?= Makowiecki, Jul 10, 2007, in forum: C++
    Replies:
    1
    Views:
    775
    Alf P. Steinbach
    Jul 10, 2007
  5. Liora
    Replies:
    5
    Views:
    605
    Tad McClellan
    Jan 12, 2007
Loading...

Share This Page