I have a function that reads line by line a TXT file to disk and formats it extracting only what interests me, getting a list like this:
Swi 04/11/2018 Basel Lugano 3 2 2 0
Swi 03/11/2018 Grasshopper Young Boys 0 3 0 0
Swi 04/11/2018 Luzern Zürich 2 5 1 2
Swi 04/11/2018 Sion St. Gallen 0 1 0 1
What is the best way to return this list? Save to disk (CSV or JSON) or do you have some Python framework that I can do this?
It will be used by another file .py
. Remember that this list can reach more than 300 lines.