Python Practice › Tuple Programs › Program 22

Length of a tuple

EasyTuple Programs · 22 of 70

Write a Python program to find the length of a tuple.

Advertisement
Input
("v", "i", "r", "a", "t")
Output
5

Approach

  1. len().

Solution

Python
print(len(("v", "i", "r", "a", "t")))
Output
5
Advertisement

Learn the concept

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

More tuple programs

← All 70 Tuple Programs