type(request)
return 'bytes',
type(request[5])
returns 'int' When I try to this
request[5] = request[5] + 1
I get this error:
request[5] = request[5] + 1
TypeError: 'bytes' object does not support item assignment
How to increase "1" this member of bytes ?
bytesas numbers is merely a throwback to earlier models of working with raw data. Individualbytesdo not represent actual numbers on which numeric operations make sense – for example,b"\xff"[0]+1does not produce validbytesdata. Is there a reason why you need to perform such operations?request = request[:5] + bytes((request[5] + 1,)) + request[6:]