3 ms·
You could make read_portfolio a generator ( https://wiki.python.org/moin/Generators https://wiki.python.org/moin/Generators ). But that might confuse inexperien
by rjh29 3y ago
You could make read_portfolio a generator ( https://wiki.python.org/moin/Generators https://wiki.python.org/moin/Generators ). But that might confuse inexperienced Python programmers.
Personally the way you've done it is the most Pythonic IMO. List comprehensions are great but would be less readable in this case.