4 ms·
A map lambda example is what I had in mind when reading the article. I'm not a big fan of the temporary variables, though. Admittedly the example below is not
by avnigo 4y ago
A map lambda example is what I had in mind when reading the article. I'm not a big fan of the temporary variables, though.
Admittedly the example below is not a perfect solution, but that's where I thought the article was heading when splitting that code over multiple lines for readability.
map(
lambda x: x.split('=')[1],
(url
.split('?')[1]
.split('&')[-3:]
)
)
Is this still too unreadable or more messy?