Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created March 3, 2021 00:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IndhumathyChelliah/2d69fdc0d75cee7c725a47055ad34e1b to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/2d69fdc0d75cee7c725a47055ad34e1b to your computer and use it in GitHub Desktop.
#unpacking first,middle,last elements
num=(1,2,3,4,5)
first,*middle,last= num
print (first)
#Output: 1
print (middle)
#Output: [2,3,4]
print (last)
#Output: 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment