Shorten Your Code Significantly in Python With The Walrus Operator

Published: 10 August 2022
on channel: Indently
10,692
518

This might be the first time you hear about the walrus operator. Well, it was introduced to us in Python 3.8 and still hasn't become incredibly common just yet, but that doesn't mean it's existence should be ignored.

Just as with list comprehensions, when use correctly, the walrus operator can significantly shorten the amount lines needed in your code.