本文教程操作环境:windows7系统、Python 3.9.1,DELL G3电脑。
库安装:
pipinstallmsgpack
导入使用:
importmsgpack
使用操作:
importmsgpack var={'a':'this', 'b':'is', 'c':'atest' } print(var)
输出结果:
{'a':'this','b':'is','c':'atest'}
使用msgpack库运行出来的格式以及长度在上述已充分表示,大家现在应该都掌握了吧,如果还想继续探索,也可以对比与json库的差别哦~
下一篇