摘要:
>>> from timeit import Timer >>> Timer("temp = x; x = y; y = temp", "x = 2; y = 3").timeit() 0.04535215532074004 >>> Timer("x, y = y, x", "x = 2; y = 3").timeit() 0.06476211600816484 阅读全文
posted @ 2018-08-27 09:29
道高一尺
阅读(299)
评论(0)
推荐(0)
摘要:
>>> x = 1 >>> y = 2 >>> assert x == y, "not equals" Traceback (most recent call last): File "", line 1, in assert x == y, "not equals" AssertionError: not equals >>> 阅读全文
posted @ 2018-08-27 09:13
道高一尺
阅读(181)
评论(0)
推荐(0)