find the smallest number in list python code example
Example 1: minimum in list python
c=[4, 10, 2, 57]
print(min(c))
# 2
Example 2: find the smallest number in list by comparison python
def smallest_num_in_list( list ):
min = list[ 0 ]
for a in list:
if a < min:
min = a
return min