use float() function in python code example
Example 1: float inf in python
float('inf')
float('-inf')
Example 2: float python 3
float(x)
#5 as a float would have to be writen as
float(5.0)
float('inf')
float('-inf')
float(x)
#5 as a float would have to be writen as
float(5.0)