How to convert float value into int value in python?


Warning: Trying to access array offset on false in /home3/indiakep/public_html/wp-content/plugins/dw-question-answer/inc/Template.php on line 8
All QuestionsCategory: PythonHow to convert float value into int value in python?
chetan shidling asked 6 years ago

I need short information.

1 Answers
chetan shidling answered 6 years ago

Let’s see one example:
>>>a = 4.5
>>>b = int(a)
>>>type(b)
<class ‘int’ >
>>>b
4

chetan shidling replied 6 years ago

This you can convert float value into int value.