扫码下载编程狮APP
W3Cschool
恭喜您成为首批注册用户
获得88经验值奖励
math 模块
Python math.nan 返回一个浮点值 nan(not a number,不是一个数字),这个值不是一个合法数字。
math.nan 相当于 float('nan') 的输出。
math.nan 常量语法如下:
math.nan
返回一个浮点数 nan。
以下实例返回 nan:
# 导入 math 包 import math # 输出 nan print (math.nan) # 输出 nan 类型 print (type(math.nan))
输出结果:
nan <class 'float'>
更多建议:
扫描二维码
下载编程狮App
编程狮公众号
联系方式:
更多建议: