On Sep 20, 8:13 pm, [EMAIL PROTECTED] wrote:
> Duncan Booth:
>
> > > e.g. the python equivalent to the c++ loop
> > > for (i = 10; i >= 0; --i)
>
> > The exact equivalent would be:
> >         for i in range(10, -1, -1): print i
>
> I'd use xrange there. Anyway, I have always felt that Python syntax
> not easy to understand at first sight, expecially when you try to
> convert a bit more complex inverted for loops from/to C to/from
> Python. It's one of the few cases where (for example) Pascal (loop)
> syntax wins a bit over Python syntax :-)
>
> Bye,
> bearophile

That's a lot of responses guys. Thanks a lot i think i got it.
Another question, are there any pointers in python (or iterators) for
when i use
a data structure that doesn't support random access?

Thanks again, Alex
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to