Saturday, March 3, 2018

Number max() Method


Number max() Method in Python 3:


Description
The max() method returns the largest of its arguments i.e. the value closest to positive infinity.

Syntax
Following is the syntax for max() method

max(x, y, z, .... )

Parameters
· x - This is a numeric expression.
· y - This is also a numeric expression.
· z - This is also a numeric expression.
Return Value
This method returns the largest of its arguments.
Example
The following example shows the usage of the max() method.

When we run the above program, it produces the following result -