find the smallest number in list by comparison python

Solutions on MaxInterview for find the smallest number in list by comparison python by the best coders in the world

showing results for - "find the smallest number in list by comparison python"
Matilda
30 Apr 2020
1def smallest_num_in_list( list ):
2    min = list[ 0 ]
3    for a in list:
4        if a < min:
5            min = a
6    return min