min()
function is used to find the the smallest element in an iterable or smallest of two or more parameters in Python for the given input.
min()
function is a part of Python Built-in Functions.
Syntax of min()
Function
The syntax of
min()
function in Python is:
min(iterable, *iterables[,key, default]) min(arg1, arg2, *args[, key])
Parameters of min()
Function in Python
x
– Where x
is any valid . This parameter is required.
Compatibility
min()
function is available and compatible with both Python 2.x
and 3.x
.
Return Value of min()
Function in Python
min()
function returns the smallest element in an iterable or smallest of two or more parameters for the given input.
Python min()
Function Example 1
Example CODE
Output:
Python min()
Function Example 2
Example CODE
Output: