gett error message: "TypeError: 'int' object is not callable"

Simon Forman sajmikins at
Thu Jul 9 20:01:47 EDT 2009

On Thu, Jul 9, 2009 at 9:42 AM, Nick<nleioatt at> wrote:
>    fields = line.split()
>    for i in range(len(fields)):
>        fields[i] = float(fields[i])

instead of the above code you could say:

fields = [float(n) for n in in line.split()]

Have fun getting back into python! :]  (A lot has changed in the last few years)

More information about the Python-list mailing list