Python 3 教程
Python 內(nèi)置函數(shù)
float() 函數(shù)用于將整數(shù)和字符串轉(zhuǎn)換成浮點數(shù)。
float()方法語法:
class float([x])
返回浮點數(shù)。
以下實例展示了 float() 的使用方法: