[Tutor] calling subroutines into program
Kent Johnson
kent37 at tds.net
Mon Feb 7 22:21:38 CET 2005
Liam Clarke wrote:
> oh? Is is the negative?
No, the decimal fraction. It's easy enough to try it:
>>> int('950')
950
>>> int('-950')
-950
>>> int('950.00')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ValueError: invalid literal for int(): 950.00
>>> int('-950.00')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ValueError: invalid literal for int(): -950.00
Kent
>
>
> On Mon, 07 Feb 2005 09:36:02 -0500, Kent Johnson <kent37 at tds.net> wrote:
>>No, because list[1] is '-950.00' which will not parse as an int.
>>
>>Kent
>>
>>_______________________________________________
>>Tutor maillist - Tutor at python.org
>>http://mail.python.org/mailman/listinfo/tutor
>>
>
>
>
More information about the Tutor
mailing list