Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
timeit.timeit()似乎整个函数返回值都被吃掉了,尽管您可以打印该值 - 不允许将返回值保存到变量中。
timeit.timeit()
例如。
data = None time = timeit(lambda: data = function_invocation, number=1)
这可以实现timeit吗?
timeit