1. all（all items are True?） 迭代中所有元素均为True或者为空也返回true
2. any（any item is True?）, 迭代中任意一个元素为True，则返回True，否则返回False，为空返回False
4. bin 返回二进制形式
5. bool 返回布尔值
大部分用法和bytes/str有点像，不过bytearray是可变的类似a list of char，str是immutable的。也就说说改变字符串的时候其实是把内存中真个对象换了，bytearray的话，只换某个字符，性能好一些
A bytearray is very similar to a regular python string (str in python2.x, bytes in python3) but with an important difference, whereas strings are immutable, bytearrays are mutable, a bit like a list of single character strings.
This is useful because some applications use byte sequences in ways that perform poorly with immutable strings. When you are making lots of little changes in the middle of large chunks of memory, as in a database engine, or image library, strings perform quite poorly; since you have to make a copy of the whole (possibly large) string. bytearrays have the advantage of making it possible to make that kind of change without making a copy of the memory first.
But this particular case is actually more the exception, rather than the rule. Most uses involve comparing strings, or string formatting. For the latter, there’s usually a copy anyway, so a mutable type would offer no advantage, and for the former, since immutable strings cannot change, you can calculate a hash of the string and compare that as a shortcut to comparing each byte in order, which is almost always a big win; and so it’s the immutable type (str or bytes) that is the default; and bytearray is the exception when you need it’s special features.
bytes is an immutable version of bytearray
9. chr 和 ord
10. @classmethod 和 @staticmethod
classmethod must have a reference to a class object as the first parameter, whereas staticmethod can have no parameters at all.