If I want to convert a float to an integer in Python, what function do I use?
The problem is that I have to use a variable passed through the function math.fabs
(Absolute Value) as an index for a list, so it has to be an int
, while the function math.fabs
returns a float
.