首页 > 编程语言 > 详细

python list查询及所需时间

时间:2018-03-25 19:18:37      阅读:215      评论:0      收藏:0      [点我收藏+]

time
cost_time(fun):
    cost(*args,**kwargs):
        stime = time.time()
        x = fun(*args,**kwargs)
        etime = time.time()
        ,fun.,etime-stime
        x
    cost
list_query(_list,_val):
    low = height = (i) - mid = (height - low) // n (height+):
        _list[n] == _val:
            n
    n (mid,height+):
        _list[n] == _val:
            n
__name__ == :
    i = ()
    subscript = list_query(i,)
    subscript


python list查询及所需时间

原文:http://blog.51cto.com/guoshiwei/2090912

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