What is the difference between array.array('B') and bytearray?
from array import array
a = array('B', 'abc')
b = bytearray('abc')
a[0] = 100
b[0] = 'd'
print a
print b
Are there any memory or speed differences? What is the preferred use case of each one?