number of packets of that type python code example
Example 1: python struct pack
import struct
var = struct.pack('hhl', 5, 10, 15)
print(var)
print(struct.unpack('hhl', var))
Example 2: join python documentation
>>> ''.join(['A', 'B', 'C'])
'ABC'
>>> ''.join({'A': 0, 'B': 0, 'C': 0}) # note that dicts are unordered
'ACB'
>>> '-'.join(['A', 'B', 'C']) # '-' string is the seprator
'A-B-C'