:= Symbol in Python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

:= Symbol in Python

I recently came across a program in Python that included the symbol “:=“. Can someone explain what that does? Thanks!

27th Aug 2020, 9:51 PM
Connor
Connor - avatar
1 Answer
+ 8
Meet "The Walrus"... it's a new feature with python 3.8, it allows you to assign and return values all in one line, it's pretty cool https://realpython.com/lessons/assignment-expressions/
27th Aug 2020, 10:00 PM
Steven M
Steven M - avatar