int Function |
The int function converts a given expression to an integer value.
Any precision after the decimal point will be lost in the conversion.
Caution |
---|
The int function will not round an expression to the nearest integer value. Instead, int will simply strip the decimal portion of the numeral. To round a real number to the nearest integer value consider using the math.round function. |
int(expr);
expr | Required. An expression to convert to an integer |
An whole-number integer value.