mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 06:46:17 +00:00
Adding nested unpacking
This commit is contained in:
@@ -232,6 +232,12 @@ You can use this to swap variables, as well:
|
||||
|
||||
a, b = b, a
|
||||
|
||||
Nested unpacking works too:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
a, (b, c) = 1, (2, 3)
|
||||
|
||||
Create an ignored variable
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Reference in New Issue
Block a user