News for hackers. Stuff that matters.
Re:Advanced Python Mastery – A Course by David Beazley by rjh29 on Wednesday July 19, 2023 @11:12AM (#36787787)
You could make read_portfolio a generator ( 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.

There are no comments on this comment yet.