Closes #16916: clarify "slicing equivalent to extended unpacking" example: the latter always creates a list.
This commit is contained in:
parent
0bc0664520
commit
841f5a673f
|
@ -68,7 +68,7 @@ empty list if there are no such items.
|
|||
For example, if ``seq`` is a slicable sequence, all the following
|
||||
assignments are equivalent if ``seq`` has at least three elements::
|
||||
|
||||
a, b, c = seq[0], seq[1:-1], seq[-1]
|
||||
a, b, c = seq[0], list(seq[1:-1]), seq[-1]
|
||||
a, *b, c = seq
|
||||
[a, *b, c] = seq
|
||||
|
||||
|
|
Loading…
Reference in New Issue