How to use min() function in Python?
Using min() function in Python is very easy. You just need to pass the list as a parameter in the min function and it will return the minimum number.
Example: We can easily find Python min of two numbers.
Python
print ( min ( 45 , 56 )) |
Output
45
Python min() Function
Python min() function returns the smallest of the values or the smallest item in an iterable passed as its parameter.
Example: Find Python min integer from the list
Python
numbers = [ 23 , 25 , 65 , 21 , 98 ] print ( min (numbers)) |
Output
21