1、threading模块
import threading import time def foo(something): for i in range(10): time.sleep(1) print(something)