Learn Python Coding
Link
click to show
click to show
Here's a small fact about Python 🐍
The := operator is called the "walrus" because the symbols resemble the eyes and tusks of a walrus 🦭
It was introduced in Python 3.8 and allows you to assign a value to a variable and use it directly within the expression at the same time.
For example:
while (line := input("Say something: ")) != "quit":
print(f"You said: {line}")
Without it, you would have to retrieve the value separately using input(), and then check it.
Have you ever used the := operator in your code?
#Python #Programming #WalrusOperator #Coding #TechFacts #Python3
✨ Join Best TG Channels https://t.me/addlist/0f6vfFbEMdAwODBk
⭐️ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
11 · 5.9K ·