float from numbers in text file

davidgp davidvanijzendoorn at gmail.com
Mon Jun 21 18:54:18 EDT 2010


hello,
i have a text file that contains gps coordinates that i want to load
into my mysql database
the file is basically in this format:
52.2375412
5.1802704

i basically tried this:
lat =0.0
for line in f:
  lat = float(line)

but this gives an error.. does anyone know what i should to do?
thanks,



More information about the Python-list mailing list