Copyright © tutorialspoint.com

Python Number min() Function

previous next


Description:

This function returns the smallest of its arguments: the value closest to negative infinity

Syntax:

min( x, y, z, .... )

Parameters:

Here is the detail of parameters:

Return Value:

The smallest of its arguments

Example:

#!/usr/bin/python

print "min(80, 100, 1000) : ", min(80, 100, 1000)
print "min(-20, 100, 400) : ", min(-20, 100, 400)
print "min(-80, -20, -10) : ", min(-80, -20, -10)
print "min(0, 100, -400) : ", min(0, 100, -400)

This will produce following result:

min(80, 100, 1000) :  80
min(-20, 100, 400) :  -20
min(-80, -20, -10) :  -80
min(0, 100, -400) :  -400

previous next

Copyright © tutorialspoint.com