list_1 = [(2, 0), (1, 1), (3, 2), (2, 3)]
temp = list_1[0][0]
if temp < max(list_1):
I want to make sure that the values from the two-dimensional list are the highest values in this list
Since it is a two-dimensional list, if you use max, the triple is returned, so it cannot be compared with the int value.
Is there a way to know max among list_1[*][1]
(the first value among all tuples in the list)?
>>> list_1 = [(2, 10), (1, 11), (3, 12), (2, 13)]
>>> max_0th = max(t[0] for t in list_1)
>>> max_0th
3
>>> max_1th = max(t[1] for t in list_1)
>>> max_1th
13
>>>
758 Error in x, y, and format string must not be None
856 Uncaught (inpromise) Error on Electron: An object could not be cloned
1235 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
771 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2025 OneMinuteCode. All rights reserved.