Fwd: Adding where keyword inside list coprehensions

July 15, 2019
10:58 a.m.
This comes up pretty often. Every example can be replaced by a loop over a single item list. It's a bit idiomatic, but not difficult. Many, as you note, can use the new walrus operator instead. [price for price in [item.get('price')] for item in basket if price is not None] On Mon, Jul 15, 2019 at 10:21 AM Fabrizio Messina <zauddelig@gmail.com> wrote:
-- Keeping medicines from the bloodstreams of the sick; food from the bellies of the hungry; books from the hands of the uneducated; technology from the underdeveloped; and putting advocates of freedom in prisons. Intellectual property is to the 21st century what the slave trade was to the 16th.
2074
Age (days ago)
2074
Last active (days ago)
0 comments
1 participants
participants (1)
-
David Mertz