Перейти к содержанию

Python float() built-in function

Python float() built-in function

From the Python 3 documentation Return a floating point number constructed from a number or string x.

Examples

>>> float('10')
# 10.0
>>> float(10)
# 10.0