Python walrus operator is weird...
Python walrus operator (:=) was introduced in Python 3.8. This operator helps most of the developers to assign variables in the middle of an expression.
Let's have a quick look, how walrus operator comes into hand.
def add(x):
return x + 1
# ...
blog.rajeshpudasaini.com.np2 min read