Am wondering why the magic command %%timeit does keeps on running even after the end of the loop
from time import sleep
def timer(limit):
for ran in range(0, limit):
print(ran)
sleep(1)
# First cell with magic command %time
%%time
timer(10) # Stops when ran = 9 as expected
# Second cell with magic command %timeit
%%timeit
timer(10) # Goes on infinitely