I tried some code from a python [tutorial for python struct][1]:
import struct
import binascii
values = (1, 'ab', 2.7)
s = struct.Struct('I 2s f')
packed_data = s.pack(*values)
and got error
Input In [4], in <cell line: 1>()
----> 1 s.pack(1, 'ab', 2.7)
error: argument for 's' must be a bytes object
Where is the problem?