why I don't like range/xrange
Roger Miller
roger.miller at nova-sol.com
Fri Feb 16 14:42:03 EST 2007
On Feb 16, 7:01 am, "Bart Ogryczak" <B.Ogryc... at gmail.com> wrote:
> On Feb 16, 4:30 pm, "stdazi" <std... at gmail.com> wrote:
>
> > for (i = 0; some_function() /* or other condition */ ; i++)
>
> C's "for(pre,cond,post) code" is nothing more, then shorthand form of
> "pre; while(cond) {code; post;}"
I don't disagree with your basic point, but technically this is not
quite true.
Try it with
for (i = 0; i < n; i++) {
if (x[i] == 0) continue;
printf("%d\n", x[i]);
}
More information about the Python-list
mailing list