Preface: I am extremely new to Python, so this question may be asked poorly.
I am working with an API that returns a buffer which I need to edit and then pass back into another function. In the API documentation, buffer is shown as the return data type. Which brings me to my first question: what exactly is a buffer datatype?
If I treat the buffer as a bytearray and edit it, I get the following error:
'str' object does not support item assignment
Googling led me to believe the buffer may actually be a bytes datatype. If this is indeed the case, how can I edit the nth byte in the buffer of bytes?