title: difference between len and sizeof
body: <p>I am using python 3.6 - and I am trying to use the struct library to pack little endian data packets to be sent to a custom protocol using UDP.</p>
  <p>If we do <code>len(struct.pack('&lt;hhislddiii',1,2,3,b'C',1,2,3,4,5,6))</code> then we get 41 which is the correct length in terms of bytes. However, if we do <code>struct.pack('&lt;hhislddiii',1,2,3,b'C',1,2,3,4,5,6).__sizeof__()</code> we get 58. Can someone please explain what is the difference between these two ? I am trying to craft a packet using scapy as a UDP packet, hence getting the right packet format is crucial. Wanted to understand the difference.</p>