buf=b"foo"
buf+=b"bar"
print(type(buf))
print(buf)
this will print "bytes" and "foobar". I am confused, if bytes is supposed to be immutable, why does the mutation += works ?
buf=b"foo"
buf+=b"bar"
print(type(buf))
print(buf)
this will print "bytes" and "foobar". I am confused, if bytes is supposed to be immutable, why does the mutation += works ?