Find the Lowest

Finding the minimum helps you spot the lowest price, the weakest result, or the lower edge of your data. The function min_list receives a non-empty list of numbers nums. Return the smallest number in the list, but do not use the built-in min function.

Примеры

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

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

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

Теги

lists
PostgreSQLv16

Tutaj pojawi się wynik wykonania kodu

Visible tests
1
Input
[3,1,2]
Expected1
2
Input
[-1,-5,-3]
Expected-5
3
Input
[7]
Expected7
4
Input
[4,4,4]
Expected4
5
Input
[9,1,8,0]
Expected0
6
Input
[0,0,0]
Expected0
Focus radio
Paused · SomaFM · Fluid