ipython – What is %timeit in Python? – Stack Overflow

This is known as a line magic in IPython. They are unique in that their arguments only extend to the end of the current line, and magics themselves are really structured for command line development. timeit is used to time the execution of code. If you wanted to see all of the magics you can use, you could simply type: %lsmagic

Read More