Python Practice › Tuple Programs › Program 2
Maximum value in a tuple
Write a Python program to find the maximum value in a tuple.
Input
(41, 15, 69, 55)
Output
69
Approach
max()works on any iterable.
Solution
print(max((41, 15, 69, 55)))Output
69
Learn the concept
New to this topic? Read the lesson, then come back.