On Wed, Feb 8, 2012 at 8:25 AM, Aaron France
<a.france.mailingli...@gmail.com> wrote:
> for i in range(0, len(x), 2):
>    print x[i-1], x[i]

I think you want x[i], x[i+1] here, but in any case, this is a fairly
standard non-Python way to do this sort of thing. There's a variety of
more Pythonic ways to loop, but every now and then, the old C habits
still come in handy!

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to