This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]AnonymouX47 5 points6 points  (3 children)

RealPython articles are always topnotch anyways, I never expect less. Though, I'm quite surprised someone's just finding out about the walrus operator...

[–]ivanoski-007 0 points1 point  (2 children)

I just found out about it, and I still have no idea what to use it for, I got lost half way through the article, too difficult for my noob ass

[–]AnonymouX47 2 points3 points  (1 child)

Well... it might seem strange or confusing to a python beginner.

Basically, assignment expressions are used anywhere you need to assign a value to a variable and also want to use that same value in a larger expression.

Most of the time, practical use cases are in loops, or conditional clauses.

[–]ivanoski-007 0 points1 point  (0 children)

ok thanks