Easy Tutorial
❮ Python Func Divmod Python Func Number Max ❯

Python3 min() Function

Python3 Numbers


Description

The min() method returns the smallest value of the given arguments, which can be a sequence.


Syntax

Here is the syntax for the min() method:

min(x, y, z, ...)

Parameters


Return Value


Example

The following examples demonstrate the use of the min() method:

#!/usr/bin/python3

print("min(80, 100, 1000) : ", min(80, 100, 1000))
print("min(-20, 100, 400) : ", min(-20, 100, 400))
print("min(-80, -20, -10) : ", min(-80, -20, -10))
print("min(0, 100, -400) : ", min(0, 100, -400))

The output of the above examples is:

min(80, 100, 1000) :  80
min(-20, 100, 400) :  -20
min(-80, -20, -10) :  -80
min(0, 100, -400) :  -400

Python3 Numbers

❮ Python Func Divmod Python Func Number Max ❯