New to Python

Thomas Krüger thomas.krueger at gmx.net
Tue Sep 21 16:06:41 EDT 2004


w wrote:

> excuse my ignorance.  I cannot get this simple program to calculate
> the formula.
> 
> The error message is unsupported operand type(s) str.  I know the data
> that I'm reading from the file is a string but I cannot convert it to
> a float or int.

x = int(y)
or
x = float(y)
???

Thomas



More information about the Python-list mailing list