[perl-python] 20050112 while statement
Steven Bethard
steven.bethard at gmail.com
Thu Jan 13 13:23:09 EST 2005
Xah Lee wrote:
> # here's a while statement in python.
>
> a,b = 0,1
> while b < 20:
> print b
> a,b = b,a+b
>
> ---------------
> # here's the same code in perl
>
> ($a,$b)=(0,1);
> while ($b<20) {
> print $b, "\n";
> ($a,$b)= ($b, $a+$b);
> }
Because you're posting this to newsgroups, it would be advisable to use
only spaces for indentation -- tabs are removed by a lot of newsreaders,
which means your Python readers are going to complain about
IndentationErrors.
Personally, I think you should not do this over comp.lang.python (and
perhaps others feel the same way about comp.lang.perl.misc?) Can't you
start a Yahoo group or something for this? What you're doing is
probably not of interest to most of the comp.lang.python community, and
might me more appropriate in a different venue.
Steve
More information about the Python-list
mailing list