Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created March 3, 2021 00:30
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/a8137f751c087f5f2092a778b0d8d4b1 to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/a8137f751c087f5f2092a778b0d8d4b1 to your computer and use it in GitHub Desktop.
num=(1,2,3,4,5)
#unpacking last element vs rest
*rest,last= num
print (rest)
#Output: [1,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