Last active
June 21, 2019 07:09
-
-
Save eyaltrabelsi/518d67444ca8458c120bea08032f5d90 to your computer and use it in GitHub Desktop.
Pyhon-Tricks Unpacking from iterables
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
# One can unpack all iterables (tuples, list etc) | |
>>> a, b, c = 1, 2, 3 | |
>>> a, b, c | |
(1, 2, 3) | |
>>> a, b, c = [1, 2, 3] | |
>>> a, b, c | |
(1, 2, 3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment