[Tutor] Function design

Eduardo Vieira eduardo.susan at gmail.com
Tue Oct 27 20:42:53 CET 2009


On Tue, Oct 27, 2009 at 10:14 AM, Dave Angel <davea at ieee.org> wrote:

>
> But if the file contained  0.00 as one of its items, this code would still
> have the other problem I mentioned.
>
> DaveA
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>

Yes. I noticed that in another file: I had to change the line to:
if '0' in row[:lastcolumn] or '0.0' in row[:lastcolumn]:

I tried to express that by doing this:
if '0' or '0.0' in row[:lastcolumn]:
and I got very wrong results... Ouch! Don't think python is that close
to English...
Eduardo


More information about the Tutor mailing list