Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created March 3, 2021 00:44
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/839ed2da4848e3e2400c631b1fceefed to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/839ed2da4848e3e2400c631b1fceefed to your computer and use it in GitHub Desktop.
#Ignoring multiple values in tuple unpacking
num=[1,2,3,4,5,6]
#Ignoring all values except first and last element in tuple.
t1,*_,t2=num
print (t1)#Output: 1
print (t2)#Output: 6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment