from struct import *
number = 3
string = 'Hello!'
struct_fmt = "=b{}s".format(len(string))
package = pack(struct_fmt,number,str.encode(string))

