min(arg1, arg2, *args, key=None)

Return the smallest item in an iterable or the smallest of two or more arguments.


arg1??
arg2??

REMARKS
* No prefix required - Core
* If one positional argument is provided, it should be an iterable. The smallest item in the iterable is returned. If two or more positional arguments are provided, the smallest of the positional arguments is returned.
* There are two optional keyword-only arguments. The key argument specifies a one-argument ordering function like that used for list.sort(). The default argument specifies an object to return if the provided iterable is empty. If the iterable is empty and default is not provided, a ValueError is raised.
* If multiple items are minimal, the function returns the first one encountered. This is consistent with other sort-stability preserving tools such as sorted(iterable, key=keyfunc)[0] and heapq.nsmallest(1, iterable, key=keyfunc).
* link to MAX

min(iterable, *, key=None) 
min(iterable, *, default, key=None)

© 2025 Better Solutions Limited. All Rights Reserved. © 2025 Better Solutions Limited Top