Python Practice › Tuple Programs › Program 13
Sum of a tuple
Write a Python program to find the sum of the elements of a tuple.
Input
(4, 6, 2)
Output
12
Approach
sum().
Solution
print(sum((4, 6, 2)))Output
12
Learn the concept
New to this topic? Read the lesson, then come back.
1 thought on “Sum of a tuple”