For more information on concepts covered in this lesson, you can check out:
Walrus Operator Fundamentals
00:00 Walrus operator fundamentals. All of the code seen in this course was run using Python 3.9, but as mentioned in the introduction, the walrus operator was introduced in Python 3.8.
00:14 So as long as you have Python 3.8 or later, you should be good to go.
00:19 If you don’t already have Python 3.8 installed but you do have Docker available, a quick way to start working with Python 3.8 is to run one of the official Docker images using the code seen onscreen.
00:32 This will download and run the latest stable release version of Python 3.8. For more information, see Run Python Versions in Docker: How to Try the Latest Python Release.
00:47 Let’s start with some different terms that programmers use to refer to this new syntax. The operator seen onscreen is officially known as the assignment expression operator. During early discussions, it was dubbed the walrus operator because the syntax resembles the eyes and tusks of a sideways walrus.
01:06 You may also see this operator referred to as the colon equals operator or named expressions. In the next section, you’ll take a look at how to start using the walrus operator.
Become a Member to join the conversation.