max()

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:

Example 2

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

Edit this page on GitHub

Contributors

Interested in helping build Docs? Read the Contribution Guide or share your feedback.

Learn Python on Codecademy

Edit this page on GitHub

Contributors