how to write a C-style for loop?

bonono at gmail.com bonono at gmail.com
Wed Feb 15 00:45:32 EST 2006


John Salerno wrote:
> for (int i = 0; i < 50; i += 5)
>
> How would that go in Python, in the simplest and most efficient way?

for i in xrange(0,50,5): print i




More information about the Python-list mailing list