read file problem

Schüle Daniel uval at rz.uni-karlsruhe.de
Mon Feb 6 13:18:01 EST 2006


if you want the numbers you can combine it into one-liner

nums = file(r"C:\folder\myFile.txt").read().split(";")

the numbers are in string representation in the list
you can no do

nums = [float(num) for num in nums]

Regards, Daniel




More information about the Python-list mailing list