DEV Community

Discussion on: The Controversy Behind The Walrus Operator in Python

Collapse
 
keith profile image
Keith Luu

In the Miscellaneous part, I think the walrus operator may come in handy when we are working with map():

x = [1, 2, 3]
map(lambda y: [z := f(y), z**2, z**3], x)
Collapse
 
renegadecoder94 profile image
Jeremy Grifski

This is a good one!