官方参考文档:https://docs.python.org/3.7/library/_thread.html _thread库方法 (1) _thread.error (2)_thread.LockTyoe (3)_thread.start_new_thread (4)_thread.interrupt_main Raise a KeyboardInterrupt exception in the main thread. A subthread can use this function t
thread 模块在python3中改为_thread,网上的各种帖子都说不建议新手使用thread,好吃不好吃总得尝尝看. import _thread def print_num(): for i in range(100): print(i) _thread.start_new_thread(print_num,()) _thread.start_new_thread(print_num,()) _thread.start_new_thread(print_num,()) _thread.