title: What is Python's bytes type actually used for?
body: <p>Could somebody explain the general purpose of <a href="https://docs.python.org/3/library/stdtypes.html#bytes-objects" rel="noreferrer">the bytes type in Python 3</a>, or give some examples where it is preferred over other data types?</p>
  <p>I see that the advantage of <a href="https://docs.python.org/3/library/stdtypes.html#bytearray-objects" rel="noreferrer">bytearrays</a> over strings is their mutability, but what about bytes? So far, the only situation where I actually needed it was sending and receiving data through sockets; is there something else?</p>