Loop through your outer list and select the last element of each sublist:

def max_value(inputlist):
    return max([sublist[-1] for sublist in inputlist])

print max_value(resultlist)
# 9.1931

It's also best if you keep all function related variables in-scope (pass the list as an argument and don't confuse the namespace by reusing variable names).

Answer from wflynny on Stack Overflow
🌐
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
Discussions

for loop - How to find the index of the max value in a list for Python? - Stack Overflow
I have a list, and I need to find the maximum element in the list and also record the index at which that max element is at. This is my code. list_c = [-14, 7, -9, 2] max_val = 0 idx_max = 0 for ... More on stackoverflow.com
🌐 stackoverflow.com
how to find maximum from a list using a for loop in pythonic way?
but I want to use a syntax like this: var = max(item) for item in lst That doesn't look pythonic to me. In fact, it's not even right Python syntax. More on reddit.com
🌐 r/learnpython
55
5
June 27, 2023
A command to return the maximum index of a list or array - the better len - Ideas - Discussions on Python.org
Hello 😃, short form: Let’s have something called like lix() that is defined as len()-1, please! def lix(obj, /): return len(obj) - 1 Motivation: When I started coding in python a few years ago, I did not understand the general use, why len() returns one more than the maximum valid index. More on discuss.python.org
🌐 discuss.python.org
0
June 12, 2022
Finding the Max Value in a List
So much thought went into this. Just not the right thought. More on reddit.com
🌐 r/programminghorror
137
406
December 6, 2024
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-list-max-method
Python List max() Method - GeeksforGeeks
July 23, 2025 - ... Explanation: The max() function is used to find the largest value in the list a. It compares all elements and returns the highest value. The result is stored in the variable res, which is then printed.
🌐
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 - Using builtin max() function is most pythonic and the best solution in 99.5% of cases (I checked! ;)). People new to Python might not know that max() takes iterable or list of arguments, and also a key= keyword argument so we can get something like this:
🌐
Reddit
reddit.com › r/learnpython › how to find maximum from a list using a for loop in pythonic way?
r/learnpython on Reddit: how to find maximum from a list using a for loop in pythonic way?
June 27, 2023 -

lst = [1,2,3,4,5]

basically, I want to find max: max(lst)

but I want to use a syntax like this: var = max(item) for item in lst

first, why does this return a generator object instead of throwing some error?

And second, how to do it properly?

Edit: so basically there is a function. I need to compute the max value returned by the function. The function should calculate values from a list of inputs.

So, I need to de this:

var = max(func(item)) for item in lst

I just wanted to know if we can do this in one or two liner?

Find elsewhere
🌐
Real Python
realpython.com › python-min-and-max
Python's min() and max(): Find Smallest and Largest Values – Real Python
January 18, 2025 - Python’s built-in functions max() and min() allow you to find the largest and smallest values in a dataset. You can use them with iterables, such as lists or tuples, or a series of regular arguments. They can handle numbers, strings, and even dictionaries.
🌐
Python.org
discuss.python.org › ideas
A command to return the maximum index of a list or array - the better len - Ideas - Discussions on Python.org
June 12, 2022 - Hello 😃, short form: Let’s have something called like lix() that is defined as len()-1, please! def lix(obj, /): return len(obj) - 1 Motivation: When I started coding in python a few years ago, I did not understand the general use, why len() returns one more than the maximum valid index.
🌐
Vultr Docs
docs.vultr.com › python › built-in › max
Python max() - Find Maximum Value | Vultr Docs
September 27, 2024 - The output will show apple as it has the highest weight in the list. The max() function in Python provides a straightforward, yet powerful means of finding the maximum value across various data structures.
🌐
W3Schools
w3schools.com › python › ref_func_max.asp
Python max() Function
Remove List Duplicates Reverse ... Python Certificate Python Training ... The max() function returns the item with the highest value, or the item with the highest value in an iterable....
🌐
Reddit
reddit.com › r/learnpython › finding max in list
r/learnpython on Reddit: finding max in list
December 19, 2020 -
#I have 2 lists. First, i need to find the max value in list one. the value i want #from list 2 should be the one found in the same index as the max in list one. 

#example: since 135 is larger, i want to return 15
#because 135 is index 1, and 15 is index 1.
LIST_1 = [101,135]
LIST_2=[20,15]

#i would really appreciate any help, any hints! :D
🌐
Spark By {Examples}
sparkbyexamples.com › home › python › get index of max of list in python
Get Index of Max of List in Python - Spark By {Examples}
March 27, 2024 - Let’s create a list of integers and return the index position of the maximum element. Here, the max(marks) returns the maximum value of the Python list, and the index(max(marks)) returns the index position of the maximum value from the list.
🌐
Python documentation
docs.python.org › 3 › library › functions.html
Built-in Functions — Python 3.14.3 documentation
1 month ago - If two or more positional arguments are provided, the largest of the positional arguments is returned. There are two optional keyword-only arguments. The key argument specifies a one-argument ordering function like that used for list.sort(). The default argument specifies an object to return if the provided iterable is empty. If the iterable is empty and default is not provided, a ValueError is raised. If multiple items are maximal, the function returns the first one encountered.
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-find-index-of-maximum-item-in-list
Python - Find index of maximum item in list - GeeksforGeeks
July 4, 2025 - Let’s explore different methods to efficiently find the index of the maximum element in a list. max() function finds the largest value and index() returns its position in the list.
🌐
30 Seconds of Code
30secondsofcode.org › home › list › index of min or max element
Python - Index of min or max element - 30 seconds of code
July 18, 2024 - To find the index of the element with the minimum or maximum value in a list, you can use the min() and max() functions to get the minimum or maximum value in the list, and then use the list.index() method to find the index of that value. def ...
🌐
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 - Then, we use the min() method to ... price available was $3.26 per gallon of milk. The Python max() function returns the largest value in an iterable, such as a list....
🌐
dbader.org
dbader.org › blog › python-min-max-and-nested-lists
How to use Python’s min() and max() with nested lists – dbader.org
July 26, 2016 - In our example, Python’s max looks at the first item in each inner list (the string cherry, apple, or anaconda) and compares it with the current maximum element. That’s why it returns cherry as the maximum element if we just call max(nested_list). How do we tell max to compare the second item of each inner list?