Created
January 31, 2024 05:05
-
-
Save hassanuos/1c3df5b9cc87f9f1d60fa6d8cca081db to your computer and use it in GitHub Desktop.
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
#packing | |
*persons, = "hassan", "raza", "dev" | |
print(persons) | |
#output | |
# ["hassan", "raza", "dev"] | |
#unpack | |
x, *y = persons | |
print(x) #hassan | |
c, *d = y | |
print(c) #raza | |
print(d) #["dev"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment