Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Last active March 2, 2021 23:31
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/05bfae887a234109802e557a18cd7e78 to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/05bfae887a234109802e557a18cd7e78 to your computer and use it in GitHub Desktop.
#tuple packing
emp_info='Python',5,'Developer'
print (emp_info)
#Output:('Python', 5, 'Developer')
print (type(emp_info))
#Output:<class 'tuple'>
#tuple unpacking
skill,exp,role=emp_info
print (skill)#Output:Python
print (exp)#Output:5
print (role)#Output:Developer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment