Jul-16-2020, 10:47 AM
If floats are OK for calculations then one can use QUOTE_NONNUMERIC with csv.reader.
import csv with open('numbers', 'r', newline='') as f: reader = csv.reader(f, quoting=csv.QUOTE_NONNUMERIC) floats = list(*zip(*reader)) # floats value with random sample data, one value per row in 'numbers' file: [5.0, 7.0, 12.0, 65.0, 7.0, 12.0, 65.0]
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.