import csv import statistics data = [] with open ('data.txt', newline='') as f: reader = csv.reader(f, quoting=csv.QUOTE_NONNUMERIC) for row in reader: data.append(row[1]) print(data) print(statistics.mean(data)) print(statistics.stdev(data))