str表示字符串通常使用' '/" "多行字符串使用三重引号''' ''''/""" """



int表示整数
float表示浮点数:可以简单地记为小数,但是和小数有区别
其中有一种e记法

bool表示布尔值:是一种逻辑值只有true /false,通常也用1/0表示

数据之间的转换:

查看数据类型 :
a = "sdaf hisdf osi fso fosd"
type(a)
输出结果为:
str
str表示字符串通常使用' '/" "多行字符串使用三重引号''' ''''/""" """
int表示整数
float表示浮点数:可以简单地记为小数,但是和小数有区别
其中有一种e记法
bool表示布尔值:是一种逻辑值只有true /false,通常也用1/0表示
数据之间的转换:
查看数据类型 :
a = "sdaf hisdf osi fso fosd"
type(a)
输出结果为:
str
本文标题:数据类型及转换
本文链接:https://www.haomeiwen.com/subject/ukilcftx.html
网友评论