Created
June 21, 2019 07:08
-
-
Save eyaltrabelsi/4ff6af4a0e2ea4b74b6fdd651b7b6b0a to your computer and use it in GitHub Desktop.
Python-tricks unpack variables with unpacking unknown length
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> a, *b, c = [1, 2, 3, 4, 5] | |
>>> a | |
1 | |
>>> b | |
[2, 3, 4] | |
>>> c | |
5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment