<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello All,
> What is the python equivalent of the following statement?
>
> while (n--)
Like other posters said, you should give more details with your question.
What do you mean by equivalent? The following is *functionally* equivalent:
for n in range(start, 0, -1):
Of course, there is always:
while n:
...
n -= 1
But unfortunately, no, I don't think there is an equivalent in python that
has the conciseness of the C statement. The pre- and post-increment
and -decrement in C/C++/Java are very powerful and I miss them in python.
--
http://mail.python.org/mailman/listinfo/python-list