首页 > 其他 > 详细

%timeit的使用

时间:2020-01-20 22:17:06      阅读:127      评论:0      收藏:0      [点我收藏+]

 

%timeit

 

# Insert 100,000 values at the front of the list (index=0)
c0 = []
t_insert = %timeit -o -n1000 -r100 c0.insert(0, a)
# Append 100,000 values at the end of the list
c1 = []
t_append = %timeit -o -n1000 -r100 c1.append(a)

 

技术分享图片

%timeit的使用

原文:https://www.cnblogs.com/wqbin/p/12219449.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!