Chrome Extension

Float to int Python

float_val = 12.98;
print( int(float_val) ); 
# 12
We are a bunch of lazy programmers so we developed this chrome extension
search code from your favorite search engine
Install Now
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?
0 Comments
Open Code Manager We are hiring