Python Practice › Set Programs › Program 15

Minimum element of a set

EasySet Programs · 15 of 48

Write a Python program to find the smallest element in a set.

Advertisement
Input
{12, 45, 7, 33}
Output
7

Approach

  1. min().

Solution

Python
print(min({12, 45, 7, 33}))
Output
7

Learn the concept

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

More set programs

← All 48 Set Programs

Leave a Comment