max()

Anonymous contributor's avatar
Anonymous contributor
Anonymous contributor's avatar
Anonymous contributor
Published May 10, 2021Updated Sep 3, 2021
Contribute to Docs

Returns the highest value from values given or an iterable.

Syntax

max(iterable)

Example 1

Use max() to return the highest value from the shoe_sizes list:

Code
Output
Loading...

Example 2

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

Code
Output
Loading...

All contributors

Looking to contribute?

Learn Python on Codecademy