fork download
  1. from struct import *
  2. number = 3
  3. string = 'Hello!'
  4. struct_fmt = "=b{}s".format(len(string))
  5. package = pack(struct_fmt,number,str.encode(string))
  6.  
  7.  
Success #stdin #stdout 0.01s 27616KB
stdin
Standard input is empty
stdout
Standard output is empty