3 ms·
I am surprised that they didn't mention pack/unpack. And a namedtuple can take the results of unpack which means you can easily parse binary files. Like he
by nurettin 2y ago
I am surprised that they didn't mention pack/unpack. And a namedtuple can take the results of unpack which means you can easily parse binary files. Like
header = Header._make(unpack(f.read(64), header_format))
print(header)