Have recently started using the walrus operator (:=) everywhere in my Python code, which lets you write code like this: if foo := bar(): print(foo) vs: foo = bar()
if foo: print(foo) Love little reductions in boilerplate without sacrificing clarity — they add up.
Python Walrus Operator Reduces Boilerplate Code Elegantly
By
–