计算程序运行时间 import time start = time.time() #插入需要运行的代码 end = time.time() print("it cost %s s" %(round((end - start),3)))