Python Practice › Tuple Programs › Program 13

Sum of a tuple

EasyTuple Programs · 13 of 70

Write a Python program to find the sum of the elements of a tuple.

Advertisement
Input
(4, 6, 2)
Output
12

Approach

  1. sum().

Solution

Python
print(sum((4, 6, 2)))
Output
12

Learn the concept

New to this topic? Read the lesson, then come back.

More tuple programs

← All 70 Tuple Programs

1 thought on “Sum of a tuple”

Leave a Comment