Scroll Down to See All▾
absaiterallanextanyasciibinboolbreakpointbytearraybytescallablechrclassmethodcompilecomplexdelattrdictdivmodenumerateevalexecfilterfloatformatfrozensetgetattrglobalshasattrhashhelphexidinputintisinstanceissubclassiterlenlistlocalsmapmemoryviewminnextobjectoctopenordpowprintpropertyrangereprreversedroundsetsetattrslicesortedstaticmethodstrsumsupertupletypevarszip__import__clear_(dict)clear_(list)clear_(set)copy_(dict)copy_(list)copy_(set)fromkeysgetitemskeyspop_(dict)pop_(list)pop_(set)popitemsetdefaultupdatevaluescount_(tuple)count_(list)count_(str)index_(tuple)index_(list)index_(str)adddifferencedifference_updatediscardintersectionintersection_updateisdisjointissubsetissupersetremove_(set)remove_(list)symmetric_differencesymmetric_difference_updateunionupdateclosefilenoflushisattyreadreadablereadlinereadlinesseekseekabletelltruncatewritablewritewritelinesappendextendinsertreversesortcapitalizecasefoldcenterencodeendswithexpandtabsfindformatisalnumisalphaisasciiisdecimalisdigitisidentifierislowerisnumericisprintableisspaceistitleisupperjoinljustlowerlstripmaketranspartitionreplacerfindrindexrjustrpartitionrsplitrstripsplitsplitlinesstartswithstripswapcasetitletranslateupperdirzfillFunction Details: max
Description
Returns the largest item in an iterable or the largest of two or more arguments.
Extended Description
The max() function returns the largest item in an iterable or the largest of two or more arguments. It can be used with many different types, including numbers, strings, and custom objects. The optional 'key' argument specifies a function of one argument that is used to extract a comparison key from each element. The 'default' argument is returned if the iterable is empty.
Read More about max from Python Documentation
Function Signature
max(*args, key: Optional[Callable] = None, default: Optional[Any] = None) -> Any
Module: builtins
Parameters
Parameter List
- *args: Any
- key: Optional[Callable]
- default: Optional[Any]
Return
Returns the maximum value from the given arguments or iterable.
Return Type
Any
Output
Explanation
These examples show how to use max() with direct arguments, a list, and a range object.