Python float() Function
The float() function converts the specified value into a floating
point number.
Syntax
float(value)
Parameters
| Parameter | Description |
|---|---|
value |
Required. A number or a string that can be converted into a floating point number |
Return Value
A floating point number.
Example
Using the float() function:
Output
Click Run to execute your code
Enjoying these tutorials?