Python Min() function
Published February 16, 2022You may occasionally want to determine the smallest value in a Python program among a set of values. To do so, you should use the min() method. The min() is a built-in function that returns the smallest input value in a list.
Syntax
The min() method has the following syntax:
min(a,b,c,d), |
where a,b,c,d are similar types of data.
Example
In this example, we will display the smallest value in the list.
x=97, 56,34,23,67,15 |
Output
From the list, the smallest value is 15
Article Contributed By :
|
|
|
|
223 Views |