:= Symbol in Python | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Resposta
+ 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