Home >>Python Built-in Functions >Python min() Function
Python min() function is used to return the item with the lowest given input value or the item with the lowest value in a given iterable. If the given input values are strings then an alphabetical comparison is done.
Syntax:min(n1, n2, n3, ...) Or: min(iterable)
Parameter | Description |
---|---|
n1, n2, n3, ... | This parameter defines one or more items to compare. |
iterable | This parameter defines an iterable with one or more items to compare. |
x = min(1, 10, 100)
print(x)
x = min("Abhi", "Jerry", "Joker", "Devil")
print(x)