basic Python syntax

The Python Walrus Operator

The Python walrus operator := assigns a value to a variable. But unlike assignment operator =, it also returns the assigned value. This extra feature makes it into an expression, which is a construct that produces a value. It allows the walrus operator to be used in contexts where an assignment and a value are both needed, such as within a conditional statement, loops and comprehensions.

The Python pass Statement

The Python pass statement serves as a no-operation placeholder. It simply means "do nothing". However, despite its lazy nature, it is useful as a placeholder for code that you are going to fill in later. Because code blocks in Python are marked with indentations, Python statements that require code blocks underneath them need something to be indented, and the pass statement serves that purpose.