PyDocs

Nav

Python Runtime Services

max

builtins

function
  • max(iterable, /, *, key=None)
  • max(iterable, /, *, default, key=None)
  • max(arg1, arg2, /, *args, key=None)
max(iterable, *[, default=obj, key=func]) -> value
max(arg1, arg2, *args, *[, key=func]) -> value

With a single iterable argument, return its biggest item. The
default keyword-only argument specifies an object to return if
the provided iterable is empty.
With two or more positional arguments, return the largest argument.
Changed in 3.4, 3.8
  • 3.4: Added the default keyword-only parameter.
  • 3.8: The key can be None.
0 Examples
No examples for builtins/max.
See Also
No see-alsos for builtins/max
0 Notes
No notes for max