0
I have a function that reads line by line a TXT file on disk and format 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 have some structure in Python that I can do this?
'Cause it’s gonna be used by another file .py
. Remembering that this list may have more than 300 lines.
Search for generator in Python, using
yield
– Woss
uses json same that is standard anywhere.
– Jasar Orion
Thanks Anderson Carlos Woss, what I want is this
– Stefano Emmanuel