Python Practice › Set Programs › Program 15
Minimum element of a set
Write a Python program to find the smallest element in a set.
Input
{12, 45, 7, 33}Output
7
Approach
min().
Solution
print(min({12, 45, 7, 33}))Output
7
Learn the concept
New to this topic? Read the lesson, then come back.