python

Float to int Python

float_val = 12.98;
print( int(float_val) ); 
# 12
Output
12

To convert float value to int in python you can use python inbuilt function int() and pass float value to it as a parameter.

Was this helpful?