Web Analytics

Python float() Function

Type Conversion Float

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

Related Functions