Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#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