I have bytes array in Python that I want to change some value by index
arr =b'12345678'
arr[2:] =b'fff'
But I got error
TypeError: 'bytes' object does not support item assignment
Why is that ? how to do that ?
I have bytes array in Python that I want to change some value by index
arr =b'12345678'
arr[2:] =b'fff'
But I got error
TypeError: 'bytes' object does not support item assignment
Why is that ? how to do that ?
byte item assignment with bytearray
arr = b'12345678'
arr = bytearray(arr)
arr[2:] = b'fff'