码迷,mamicode.com
首页 > 编程语言 > 详细

python list查询及所需时间

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

标签:python list查询及所需时间


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查询及所需时间

标签:python list查询及所需时间

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!