In this python tuple program, we will assign values of tuples to several variables and print them.
Steps to solve the program
- Create a tuple.
- Assign values of tuples to several variables by using variable_names=tuple.
- Print the variable name and their value.
tup = (6,7,3)
(a,b,c) = tup
print("a: ",a)
print("b: ",b)
print("c: ",c)
Output :
a: 6
b: 7
c: 3
1 thought on “Program to assign values of tuples to several variables”