What is the Walrus Operator? Python 3.8 introduces the creatively named "walrus" operator. Expressed via :=, the walrus operator allows you to assign values to a variable as part of an expression. The key benefit to this new operator is that it reduces the amount of written code required. Previously if we wanted to assign a variable and print its value, you would have done something like this: >>> device_type = "router" >>> print(device_type) router In Python 3.8, you’re allowed to combine t

Close You've successfully subscribed to PacketFlow.
Close Success! Your account is fully activated, you now have access to all content.
Close Welcome back! You've successfully signed in.
Close Nearly there! To activate your account, please click the link in the email we just sent you.