python's for not like c++'s?

jerry smith reio-ta at MailAndNews.com
Tue Dec 28 01:33:30 EST 1999


for(int x=3;x<10;x+=3)
	cout << x << " ";
cout << endl;
for(int y=9;y>0;y-=3)
	cout << y<< " ";

how would i do something similiar to this in python?
all i see on the for loops for python are iterating through
the whole sequence of a list. as far as i could see there doesnt
seem to be an easy way to start somewhere in the middle of a
list. also no way to iterate through a list other than the incrament
by one and no decramenting through a list.
please help?

------------------------------------------------------------
 Get your FREE web-based e-mail and newsgroup access at:
                http://MailAndNews.com

 Create a new mailbox, or access your existing IMAP4 or
 POP3 mailbox from anywhere with just a web browser.
------------------------------------------------------------




More information about the Python-list mailing list