Language Syntax
Assignment — Python syntax
Bind the evaluated right-hand object to targets from left to right. Unpacking checks the number of items; assignment does not copy mutable objects.
Formal Syntax & Structure
python syntaxpython
target = expressionParameters & Attributes
| Name | Type | Description |
|---|---|---|
| target | assignment target | Name, attribute, item or unpacking pattern to bind or update. |
| expression | expression | Evaluated right-hand value. |
Working Example
Example Snippetpython
a = b = []a.append(7)print((a is b, b))