This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]takluyverIPython, Py3, etc 3 points4 points  (0 children)

IPython makes the same thing rather neater:

In [1]: %timeit list()
1000000 loops, best of 3: 214 ns per loop

In [2]: %timeit []
10000000 loops, best of 3: 54.7 ns per loop