title: How can i modify a byte array?
body: <p>I was reading about bytes and byte array's. I read that byte arrays mutable types!
  so, when i am trying to modify it i am getting an error saying <code>integer is required</code> Am i missing something here? The following is my code and the error</p>
  
  <pre><code>z=bytearray("hello world","utf-8")
  z[0] ="H"
  </code></pre>
  
  <p>i got the following error</p>
  
  <blockquote>
    <p>TypeError                                 Traceback (most recent call
    last)  in ()
    ----> 1 z[0]="H"</p>
    
    <p>TypeError: an integer is required</p>
  </blockquote>