0
What is walrus opertors and what is use of that?
Can any one plz explain?
1 Antwort
+ 2
For exemple:
Python
print (a := 10)
# 10
print (a = 10)
# TypeError
...
Using this operator allows you to speed up and shorten your code.
makes it possible to solve two problems at once: assign a value to a variable and return that value, so sometimes you can write the code shorter and make it more readable, and it can be even more computationally efficient