The first update in Python 3.8 is the introduction of a new operator called WALRUS Operator. Walrus Operator is also known as Assignment Expression. The symbol is colon followed by an equal to sign (:= ). The name has been derived from its resemblance to the eyes and tusk of a walrus when we look at it from the side.

(Image Courtesy: Youtube)
Assignment expressions assign and return a value in the same expression. We have seen how to assign a value and then print it out.

Now this symbol,: = assigns, and returns at the same time. It is written like this.

Usefulness of the walrus operator is still a subject to explore. You can feel assured that whatever you can do with Walrus Operator; the same can be done without it. We will see in later chapters how and where to use the walrus operator because this operator works well with Loops.
Talking about precedence, there is no official documentation about its priority. But one important condition is that this operator is always written inside brackets. Brackets or Parenthesis have the highest priority. Also, this is not only assigning, it’s returning at the same time. Hence, it’s a complete expression. Maybe that’s why there is no talk about its precedence yet.
I am using Anaconda Package and it’s providing support for Python 3.7 (as for now). For Python 3.8 I’ll be using the official version of Python 3.8 and IDLE. (That’s why you’ll find different looks in snippets of 3.7 and 3.8). Maybe by the time you are reading this, Python 3.8 is officially available in all IDEs.
Here, we are concluding week 01 . I haven’t explored a lot about how all operators work. I feel that operators can be best understood by its use in loops and not by simply writing a + b or a > b. So, from the next section we’ll start to program and then we will learn how and when to use which operator. Your job is to remember the operators.
