Min

Let’s look at how to use the reducing function, "min", on iterables.

We'll cover the following...

min function

min accepts an iterable and returns the minimum value from the iterable. For example:

Press + to interact
a = [2, 5, 7, 1]
print(min(a)) # 1

The iterable can contain items of any type, provided they can be compared with each other. ...

Access this course and 1400+ top-rated courses and projects.