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
原文地址:http://blog.51cto.com/guoshiwei/2090912