How to convert string to float in Python 1.2

Terry Reedy tjreedy at udel.edu
Sat Jan 18 18:35:07 EST 2003


"Bill Walker" <kwalker at earth1.net> wrote in message
news:3e29dba4_4 at corp.newsgroups.com...
> I'm using Python 1.2 on a ZEOS notebook which runs MS DOS 5.0.
Python 1.5 or
> higher will NOT install in DOS mode.
>
> I have a string that I need to convert to a float.
>
> f = float('1.234')

I believe you have atof() (ascii-to-float) available, either in
builtins or string module.






More information about the Python-list mailing list