uaveiro-leci/1ano/1semestre/fp/extra3/ex08.py

8 lines
292 B
Python
Raw Normal View History

2023-01-10 10:45:45 +00:00
def load(fname):
stocks_list = []
with open(fname, 'r') as f:
for stock in f:
components = stock[:-1].split('\t')
stocks_list.append((components[0], components[1], float(components[2]), float(components[3]), int(components[4])))
2023-01-10 10:45:45 +00:00
return stocks_list