What does '%% time' mean in python-3?

Question:

What does %%time mean in python? I am using python 3 and have some source code containing

%%time

Does this call the time module? or does it have another function?

Asked By: JZF

||

Answers:

%%time is a magic command. It’s a part of IPython.

%%time prints the wall time for the entire cell whereas %time gives you the time for first line only

Using %%time or %time prints 2 values:

  1. CPU Times
  2. Wall Time

You can read more about it in the documentation

Answered By: Vedant Shetty
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.