+ 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 - avatar
1 ответ
+ 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