立即学习:https://edu.csdn.net/course/play/7372/149483?utm_source=blogtoedu
python基础——数据类型
1、int——integer——整数
str——string——字符串
2、数据类型:
整形:int ——eg:100,-1
浮点型:float——eg:3.14,-93.7
布尔型:bool——eg:False,True
字符串型:str——eg:“iLync” “你好!中国”
3、type——获得输出变量的数据类型
eg:
num01 = 100
num02 = 5.6
is_big = (100 > 88)
str01 = "baby"
# type-------输出变量的数据类型
print(type(num01))
print(type(num02))
print(type(is_big))
print(type(str01))
``````````````````
<class ' int ' >
<class ' float ' >
<class ' bool ' >
<class ' str ' >