Computer Studies‎ > ‎Python‎ > ‎References‎ > ‎

min() Demo

a = 4
b = 5
c = 6

print (min(a, b, c))
...would return the minimum of 4, 5, 6, which of course is 4.

The min() function also can be used to find the lowest item in a list, as in this example:
list = ['C', 'B', 'A']

print (min(list))
Comments