title: Python : Get size of string in bytes
body: <p>I have a string that is to be sent over a network. I need to check the total bytes it is represented in.</p>
  
  <p><code>sys.getsizeof(string_name)</code> returns extra bytes. For example for <code>sys.getsizeof("a")</code> returns 22 , while one character is only represented in 1 byte in python. Is there some other method to find this ?</p>