mudit tuli wrote: > For a single byte, struct.pack('<B',<int>) > For two bytes, struct.pack('<H',<int>) > what if I want three bytes ? > Four bytes and then discard the most-significant byte: struct.pack('<I', <int>)[ : -1]