Find the Highest

Finding the maximum helps you pick the best score, the highest price, or a record value. The function max_list receives a non-empty list of numbers nums. Return the largest number in the list, but do not use the built-in max function.

Примеры

Ввод
[1, 5, 3]
Вывод
5
Ввод
[-1, -5, -3]
Вывод
-1
Ввод
[7]
Вывод
7

Нужно реализовать

def max_list(nums: list[int]) -> int:

Теги

lists
PostgreSQLv16

Your code output will appear here

Visible tests
1
Input
[1,5,3]
Expected5
2
Input
[-1,-5,-3]
Expected-1
3
Input
[7]
Expected7
4
Input
[2,2,2]
Expected2
5
Input
[9,1,8,2]
Expected9
6
Input
[3,5,1]
Expected5
Focus radio
Paused · SomaFM · Fluid