Reading in strings -> numbers ??
Louis M. Pecora
pecora at anvil.nrl.navy.mil
Sun Apr 30 10:17:30 EDT 2000
In article <390A2D23.7029E557 at fenx.com>, <emile at fenx.com> wrote:
> If you're trying to put the info on disk to read it
> in again later, look at eval(repr()), eg:
>
> >>> a,b,c = eval(repr((1.2, -3.5, 10)))
> >>> a,b,c
> (1.2, -3.5, 10)
Problem is I'm often reading in data generated by another program or
another person, e.g. ANSII or binary float values in "table form".
More information about the Python-list
mailing list