Python bytes vs bytearray
What’s the Difference Between bytes() and bytearray()? The difference between bytes() and bytearray() is that bytes() returns an immutable and bytearray() returns a mutable object. So you can modify a bytearray but not bytes type. Here’s a minimal example that nicely demonstrates the difference of the two functions: You create two variables a and b. … Read more