PythonBuilt-inmin
sum

minBuilt-in

max

Returns the smallest item in an iterable.

Syntax

min(iterable, key?)

Example

Enter values below to update the example in real time.

print
key
apple
print(min([3, 1, 4, 1, 5, 9]))              # 1
print(min("apple", "banana", key=len))       # apple