python standard library
Standard Library 中有用的函数 https://docs.python.org/2/library/index.html http://python-reference.readthedocs.io/en/latest/index.html binO: int -> binary 位运算的时候有用。 相关位运算有用的打包函数有: divmod() binary->int int([binary string], 2) ... 以后再补充 Data structure: 这是可以用于threading的queue. 是否thread safe有待考证。。 https://docs.python.org/2/library/queue.html Example of how to wait for enqueued tasks to be completed: def worker (): while True : item = q . get () do_work ( item ) q . task_done () q = Queue () for i in range ( num_worker_threads ): t = Thread ( target = worker ) t . daemon = True t . start () for item in source (): q . put ( item ) q . join () # block until all tasks are done http://book.pythontips.com/en/latest/map_filter.html http://zh-google-styleguide.readthedocs.io/en/latest/contents/ http://www.pythonforbeginners.com/basics/list-comprehensions-in-python Random函数...