Try this:

 for x in xrange(3, 0, -1):
   ....:     print x
   ....:
   ....:
3
2
1

HTH,
Wayne

On Mon, Dec 1, 2008 at 2:20 PM, WM. <[EMAIL PROTECTED]> wrote:

> Stooges.py
>
> i,j,k = 3,3,3
> while i != 1:
>    print 'Larry, Moe & Curly Joe!'
>    i -= 1
>    while j != 1:
>        print 'Go Mad!!'
>        j -= 1
> while k != 1:
>    print 'Go-go bad-bad!!'
>    k -= 1
> print '\nBye-bye.'
>
> I am trying to learn loops.  These nested 'whiles' work OK but I would like
> to wrap this script in a 'for' loop. I have not been able to make that work.
>
>
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
To be considered stupid and to be told so is more painful than being called
gluttonous, mendacious, violent, lascivious, lazy, cowardly: every weakness,
every vice, has found its defenders, its rhetoric, its ennoblement and
exaltation, but stupidity hasn't. - Primo Levi
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to