#str表示是一个字符串类型
name = “小明”
#int表示是一个整型类型
age = 18
#boolean表示是布尔类型 真 True 假 False
gender = True
#float表示是一个浮点数类型
height = 1.75
weight = 75.0
print(“name变量类型是:”)
print(type(name))
print(“age变量类型是:”)
print(type(age))
print(“gender变量类型是:”)
print(type(gender))
print(“height变量类型是:”)
print(type(height))
print(“weight变量类型是:”)
print(type(weight))
Python基础学习03变量的使用使用type函数查看变量类型
最新推荐文章于 2022-11-22 23:22:32 发布