min()

Published May 10, 2021Updated Sep 3, 2021
Contribute to Docs

Returns the lowest value from values given or an iterable.

Syntax

min(iterable)

Example 1

Use min() to return the lowest value from the shoe_sizes list:

us
Visit us
code
Hide code
Code
Output
Hide output
Hide output
Loading...

Example 2

Use min() to return the lowest value from the values "Tom", "Jerry", "Spike", "Tyke":

us
Visit us
code
Hide code
Code
Output
Hide output
Hide output
Loading...

All contributors

Looking to contribute?

Learn Python on Codecademy