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.

Answer from Kadima on Stack Overflow
๐ŸŒ
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....
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-max-function
Python - max() function - GeeksforGeeks
July 15, 2025 - Python max() function returns the largest item in an iterable or the largest of two or more arguments.
People also ask

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
๐ŸŒ
Medium
medium.com โ€บ @antash โ€บ six-ways-to-find-max-value-of-a-list-in-python-b7d7ccfabc0d
Six ways to find max value of a list in Python | by Tomasz Wฤ…siล„ski | Medium
November 16, 2016 - def max(arr): max_ = arr[0] for item in arr: if item > max_: max_ = item return max_ Not to much to write aboutโ€ฆ This is the simplest implementation, since itโ€™s written in Python it will be much slower than using the builtin max() which is implemented in C.
๐ŸŒ
Real Python
realpython.com โ€บ ref โ€บ builtin-functions โ€บ max
max() | Pythonโ€™s Built-in Functions โ€“ Real Python
The built-in max() function allows you to find the largest values in an iterable or among multiple arguments.
๐ŸŒ
Hyperskill
hyperskill.org โ€บ university โ€บ python โ€บ max-in-python
Python max() Function โ€” Syntax, key Parameter & Examples
August 10, 2026 - This course is dedicated to core Python skills that will give you a solid base and allow you to pursue any further direction, be it Backend Development or Data Science. ... The max() function in Python is commonly employed to identify the value from a provided collection of elements.
Find elsewhere
๐ŸŒ
Interview Kickstart
interviewkickstart.com โ€บ home โ€บ blogs โ€บ learn โ€บ max() function in python: syntax, parameters, and examples
max() Function in Python: Syntax, Parameters & Examples
April 1, 2026 - It determines the result by comparing values using the default > and < operators, and if there are multiple equal maximum values, it returns the first one it encounters. The Python max function is used in two common ways: you can pass multiple values directly, or you can pass a single iterable such as a list, tuple, or string.
๐ŸŒ
YouTube
youtube.com โ€บ practical coding
How to use Python max() built-in function - YouTube
In this beginner's Python tutorial, you will learn how to use the max() built-in Python function. The max() function returns the highest element value in a P...
Published: July 13, 2020
Views: 600
๐ŸŒ
Programiz
programiz.com โ€บ python-programming โ€บ methods โ€บ built-in โ€บ max
Python max()
max() returns the largest element from an iterable. ... If the items in an iterable are strings, the largest item (ordered alphabetically) is returned. languages = ["Python", "C Programming", "Java", "JavaScript"]
๐ŸŒ
Career Karma
careerkarma.com โ€บ blog โ€บ python โ€บ python min and max: the ultimate guide
Python Min and Max: The Ultimate Guide | Career Karma
December 1, 2023 - The max() method then calculated which of these names comes last alphabetically and returned that name to the program. Finally, our code printed out a message that stated the name that appears last in the alphabet. Often, when youโ€™re working with lists or strings, youโ€™ll want to find the lowest or highest value that appears in that list or string. The Python min() and max() methods can be used to do so.
๐ŸŒ
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.
๐ŸŒ
Tutorialspoint
tutorialspoint.com โ€บ python โ€บ list_max.htm
Python List max() Method
The Python List max() method compares the elements of the list and returns the maximum valued element. If the elements in the list are numbers, the comparison is done numerically; but if the list contains strings, the comparison is done
๐ŸŒ
Unstop
unstop.com โ€บ home โ€บ blog โ€บ python max() function | all use cases with code examples
Python max() Function | All Use Cases With Code Examples
February 12, 2025 - In Python programming, objects ... attributes and methods. The max function can be used to compare such objects to find the one with the maximum value/ largest item based on specified criteria....
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-list-max-method
Python List max() Method - GeeksforGeeks
July 23, 2025 - max() function in Python is a built-in function that finds and returns the largest element from the list.
๐ŸŒ
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.