【Python】输入并查看数据类型

print(type(1))----返回 int
print(type('您好'))----返回 str 字符串
print(type(0>1)) ------ 返回 bool  布尔类型
print(type(3.145))------返回 float 浮点类型
print(type(1))#----返回 int
print(type('您好'))#----返回 str 字符串
print(type(0>1)) #------ 返回 bool  布尔类型
print(type(3.145))#------返回 float 浮点类型
<class 'int'>
<class 'str'>
<class 'bool'>
<class 'float'>

 

posted on 2023-01-08 18:40  至清无物  阅读(148)  评论(0编辑  收藏  举报