Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created Jul 14, 2020
Embed
What would you like to do?
#tuple unpacking
t=("red","green","blue")
#ignoring value "green" while tuple unpacking
t1,_,t2=t
print (t1)#Output:red
print (t2)#Output:blue
#Ignoring multiple values in tuple unpacking
tt=(1,2,3,4,5,6)
#Ignoring all values except first and last element in tuple.
t3,*_,t4=tt
print (t3)
print (t4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment