Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Last active July 17, 2020 03:00
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/a668b57a88eaf0d8f64031dafa25d601 to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/a668b57a88eaf0d8f64031dafa25d601 to your computer and use it in GitHub Desktop.
t1=(1,2,3)
#tuple unpacking
a,b,c=t1
print (a)#Output:1
print (b)#Output:2
print (c)#Output:3
n1,n2=t1
#Output:ValueError: too many values to unpack (expected 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment