python struct.calcsize()函数(返回格式字符串fmt描述的结构的字节大小)
生活随笔
收集整理的這篇文章主要介紹了
python struct.calcsize()函数(返回格式字符串fmt描述的结构的字节大小)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
from struct.py
def calcsize(fmt): # known case of _struct.calcsize"""calcsize(fmt) -> integerReturn size in bytes of the struct described by the format string fmt.返回格式字符串fmt描述的結構的字節大小。"""return 0示例:
參考文章:python struct 官方文檔
總結
以上是生活随笔為你收集整理的python struct.calcsize()函数(返回格式字符串fmt描述的结构的字节大小)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 网络编程 数据报是什么?TCP、UDP数
- 下一篇: python struct.pack()