Python trunc function


Python trunc(x) function returns the truncated integer of x. It's a method of math module.

>>> import math
>>> math.trunc(3.234)
3

>>> math.trunc(-4.215)
-4