How to Convert int to float in Python

We can use float() function.

Here is an example:

>>> i = 4
>>> f = float(i)
>>> f
4.0

, ,