how to add find the smallest int n in a list python code example
Example 1: how to add find the smallest int n in a list python
def mymin(numlist):
numnum = numlist[0]
if len(numlist) > 0:
for i in numlist:
if i < numnum:
numnum = i
return numnum
Example 2: how to add find the smallest int n in a list python
def mymin(numlist):
numnum = numlist[0]
if len(numlist) > 0:
for i in numlist:
if i < numnum:
numnum = i
return numnum