Python数据类型:
1.数字:
①整数:
int(整型):32位电脑(-2**31~2**31-1)
long(长整型):64位电脑(-2**63~2**63-1)
②浮点(float)
③complex(复数)
2.字符串(string)
3.布尔值:
真或假
1或0
bytes数据类型:
string—encode—>bytes string变成bytes 加密
语句:
'字符串'.encode('utf-8') #字符串变成二进制格式
bytes—decode—>string bytes变成string 解密
语句:
b'二进制串'.encode('utf-8') #二进制格式变成对于的字符串
数据运算:
算数运算:
比较运算:
赋值运算:
逻辑运算:
成员运算:
身份运算:
位运算:
运算优先级: