4 ms·
sorted(u for u in users if u.last_name.startswith("S"), key=lambda u: u.last_name)[:3] Though I will conceed that I also find the fluent interface variant nice
by strokirk 7y ago
sorted(u for u in users if u.last_name.startswith("S"), key=lambda u: u.last_name)[:3]
Though I will conceed that I also find the fluent interface variant nicer.
- mehrdadn 7y agoThat doesn't parse :-)