Python tuple program to find the sum of elements in a tuple

In this python tuple program, we will find the sum of elements in a tuple.

Steps to solve the program
  1. Create a tuple.
  2. Find the sum of elements in the tuple using sum().
  3. Print the output.
				
					tup = (4,6,2)
print("Sum of elements in the tuple: ",sum(tup))
				
			

Output :

				
					Sum of elements in the tuple:  12
				
			

add a list in the tuple.

1 thought on “Python tuple program to find the sum of elements in a tuple”

Leave a Comment