W3Schools
w3schools.com › PYTHON › ref_func_max.asp
Python max() Function
Python Examples Python Compiler ... Q&A Python Training ... The max() function returns the item with the highest value, or the item with the highest value in an iterable....
Is max() an in-built function in Python?
Yes, max() is an in-built function in Python.
interviewkickstart.com
interviewkickstart.com › home › blogs › learn › max() function in python: syntax, parameters, and examples
max() Function in Python: Syntax, Parameters & Examples
What is the use of the max() and min() functions in Python?
We use Python's max() and min() functions to get the maximum or minimum object out of a set of objects or max/min object out of objects in a given iterable.
interviewkickstart.com
interviewkickstart.com › home › blogs › learn › max() function in python: syntax, parameters, and examples
max() Function in Python: Syntax, Parameters & Examples
What is the difference between the Python max() and min() functions?
Both compare items or items within an iterable on some basis and return a value. But the max() function in Python returns the max value after those comparisons, and the min() function returns the minimum value.
interviewkickstart.com
interviewkickstart.com › home › blogs › learn › max() function in python: syntax, parameters, and examples
max() Function in Python: Syntax, Parameters & Examples
Programiz
programiz.com › python-programming › methods › built-in › max
Python max()
The function returns the values of dictionaries. Based on the values (rather than the dictionary's keys), the key having the maximum value is returned.
Hyperskill
hyperskill.org › university › python › max-in-python
Python max() Function — Syntax, key Parameter & Examples
August 10, 2026 - The max() function finds the maximum value among elements of an iterable or a series of arguments. It returns the largest item based on the default ordering or a custom ordering specified by the optional key parameter. When used with iterables like lists or tuples, the function compares the ...
Vultr Docs
docs.vultr.com › python › built-in › max()
Python max() - Find Maximum Value
September 27, 2024 - The max() function in Python is a built-in utility that identifies the maximum value among the provided arguments or elements within an iterable.
ThePythonGuru
thepythonguru.com › python-builtin-functions › max › index.html
Python max() function - ThePythonGuru.com
The max() function returns the largest of the input values.Its syntax is as follows:max(iterable[, default=obj, key=func]) -> value PARAMETER …
Tutorialspoint
tutorialspoint.com › python › number_max.htm
Python max() Function
The Python max() function is used to retrieve the largest element from the specified iterable. Finding the maximum of two given numbers is one of the usual calculations we perform.
Call: +917738666252
Address: Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
Top answer 1 of 3
1
You've got one line of code backwards. Your if statement is effectively saying that if item is greater than Max, set item to Max. You need to flip that to say if item is greater than Max, set Max to item.
if item > Max:
Max = item
return Max
Also, I'm not an expert in Python, but i think you need to change the List inside your function to match the parameter name, in this case args.
2 of 3
1
*args = list of arguments -as positional arguments
You are passing a list as an argument here. So your code should look something like this -
def maximum(nums):
Max = 0
for item in nums:
if item > Max:
Max=item
return Max
List = [1,5,8,77,24,95]
print maximum(List)
This would give you the result : 95.
On the other hand you can use the max built in function to get the maximum number in the list.
print max(List)
Python Academy
python-academy.org › functions › max
max — Python Function Reference
A comprehensive guide to Python functions, with examples. Find out how the max function works in Python. Return the largest item in an iterable or the largest of two or more arguments.
Jobtensor
jobtensor.com › Tutorial › Python › en › Builtin-Functions-max
Python Built-in max(), Definition, Syntax, Parameters, Examples | jobtensor
The max() function returns the item with the highest value, or the item with the highest value in an iterable.
Scaler
scaler.com › home › topics › max() function in python
max() Function in Python- Scaler Topics
June 15, 2022 - The max() function in Python is used to return the largest or maximum element. Elements can be passed directly in the parameter, or an iterable can be passed in the parameter. If values of the different data types are passed, then the max function in python returns TypeError.