Answers for "find the smallest number in list python"

0

find the largest and smallest numbers in a list

thislist = [677,8765,8765,876,470,754,6784,56789,7658,]
thislist.sort()
print ("The smallest number is: " + str(thislist[0]))
print ("The largest number is: " + str(thislist[-1]))
Posted by: Guest on June-03-2021
0

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
Posted by: Guest on January-26-2021
2

python find smallest value in list

stuff = [37, 7, 19, 29, 5, 13, 31, 17, 23, 11, 3, 2]
print(min(stuff))
# output = 2
Posted by: Guest on December-22-2020

Code answers related to "find the smallest number in list python"

Python Answers by Framework

Browse Popular Code Answers by Language