【Python】计算语句运行时间
代码:
import time start = time.time() # your business code here elapsed = (time.time() - start) print("Time used:",round(elapsed,3)) # 自行决定保留小数数位
END
代码:
import time start = time.time() # your business code here elapsed = (time.time() - start) print("Time used:",round(elapsed,3)) # 自行决定保留小数数位
END