2 ms·
Joining the club, in Python: [e for e in employees if e.isPartTime()] You can even push it further: [e for e in employees if e.isPartTime() or e.lazy() or e.
by didip 16y ago
Joining the club, in Python:
[e for e in employees if e.isPartTime()]
You can even push it further:
[e for e in employees if e.isPartTime() or e.lazy() or e.havePassiveIncomeAlready()]
and further:
[e for e in employees if e.isPartTime() or e.lazy() or e.havePassiveIncomeAlready() or e in [exec for exec in BoardofDirector.all() if exec.haveTooManyPortfolio()]]
Above is your friendly neighborhood List Comprehension available since Jython 2.0