zoukankan
html css js c++ java
Python float() 函数
Python float() 函数
Python 内置函数
描述
float()
函数用于将整数和字符串转换成浮点数。
语法
float()方法语法:
class
float
([
x
])
参数
x -- 整数或字符串
返回值
返回浮点数。
实例
以下实例展示了 float() 的使用方法:
>>>
float
(
1
)
1.0
>>>
float
(
112
)
112.0
>>>
float
(
-
123.6
)
-
123.6
>>>
float
(
'
123
'
)
# 字符串
123.0
萍水相逢逢萍水,浮萍之水水浮萍!
查看全文
相关阅读:
poj1321(棋盘问题)
poj3009(Curling 2.0)
站点 1访问非本站点下面的web.config文件需要的权限
VS2010 Web网站发布详解
服务禁止旁注,安全设置
在Windows2012下安装SQL Server 2005无法启动服务的解决办法
Server-U与IIS端口占用问题解决
Server-U_详细配置
创建维护计划时,提示“代理XP”组件已作为此服务器安全配置的一部分被关闭
SQL SERVER 2005如何建立自动备份的维护计划
原文地址:https://www.cnblogs.com/AIBigTruth/p/10476888.html
最新文章
linux内核——PAE(物理地址扩展)
linux内核——TSS
SRM 600(1-250pt,500pt)
SRM 395(1-250pt)
SRM 396(1-250pt)
SRM 405(1-250pt, 1-500pt)
SRM 397(1-250pt)
SRM 404(1-250pt, 1-500pt)
C++的一些内置函数
SRM 398(1-250pt)
热门文章
SRM 399(1-250pt)
SRM 403(1-250pt, 1-500pt)
poj2676(Sudoku)
poj2531(Network Saboteur)
poj2115(C Looooops)
poj3414(Pots)
poj3126(Prime Path)
poj3278(Catch That Cow)
poj2251(Dungeon Master)
BestCoder Round #3(A)
Copyright © 2011-2022 走看看