min()
mathematical function in python is used to find the smallest value out of the parameters passed.
The syntax of the min()
mathematical function is given below:
min(x,x1,x2,. . . .)
x,x1,x2,. . . .
are numeric value passed as a parameter.
This mathematical function returns the smallest value of all the parameters x,x1,x2,. . . .
passed.
#name of the file: min.py
#min() on float value
print("min(4.52,4.5,4.55,4.2) = ", min(4.52,4.5,4.55,4.2))
#min() on int value
print("min(52,5,55,2) = ", min(52,5,55,2))
>python min.py
min(4.52,4.5,4.55,4.2) = 4.2
min(52,5,55,2) = 2