Skip to content

Instantly share code, notes, and snippets.

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