I have some text file like this, with several 5000 lines:
5.6 4.5 6.8 \"6.5\" (new line) 5.4 8.3 1.2 \"9.3\" (new line)
so the last t
for line in open(name, "r"): line = line.replace('"', '').strip() a, b, c, d = map(float, line.split())
This is kind of bare-bones, and will raise exceptions if (for example) there aren't four values on the line, etc.