array.array isn't a normal python array. It's an optimized type/object where all the elements of the array are of the same type. The 'B' is a format string that indicates what type you want the elements to be. B == unsigned char
He's using it because it converts the int 65 to the string 'A', then toString() to join all the array elements together.
https://docs.python.org/2/library/array.html
See my other post though, it's not the fastest way to do this in python.