test_bytes.py 160 B

123456
  1. # req = bytes((1, 2, 3), encoding='utf-8')
  2. foo = 12
  3. req = bytearray((1, 2, 3))
  4. req += foo.to_bytes(2, 'big')
  5. print(type(foo.to_bytes(2, 'big')))
  6. print(req)