In this program, you will learn how to find the sum of tuple elements in Python.
tuple1 = (10, 20, 30, 40)
tuple1 = (10, 20, 30, 40)
print("Tuple values are :", tuple1)
s = 0
for i in tuple1:
s = s + i
print("Sum of tuple elements : ", s)
Tuple values are : (10, 20, 30, 40)
Sum of tuple elements : 100