Python’s Walrus Operator and Dict Comprehensions
Python 3.8 added an assignment operator
:=, also known as the “walrus operator” (rotate it 90 degrees clockwise and you’ll see why). A few use cases are described in this page on What’s New in Python 3.8, but despite the fact that it’s not so new anymore (it came out more than three years ago), I hadn’t found much use for it until recently.
- Read more about Python’s Walrus Operator and Dict Comprehensions
- Log in or register to post comments