[Python]寫入二進制文件

import struct with open(file_name_dir, 'wb')as fp: for x in data_pack: a = struct.pack('i', int(x)) fp.write(a) fp.close() pack的格式:
相關文章
相關標籤/搜索