1、pack把指定的数据类型打包为bytes字节型,unpack按照指定的格式解析响应的数据
https://blog.csdn.net/abc_12366/article/details/80211953
2、python中内置的数据类型强制转换
pi = 3.14
print('pi:', int(pi)) # pi: 3
pi = 3
print('pi:', float(pi)) # pi: 3.0
complex1 = complex(1, 2)
print(complex1) # (1+2j)
age = 12
print('该同学今年%s岁了' % str(age)) # 该同学今年12岁了
print(repr('lily')) # "'lily'"
x = 8
print(eval('x * 3')) # 24
print(chr(65)) # A
print(ord('a')) # 97
print(hex(10)) # 0xa
print(oct(10)) # 0o12
print(bin(10)) # 0b1010