Record output of timeit in variable
How can I record in a variable the amount of time taken by a function? I read somewhere that timeit is the good way to time stuff, but it seems to print its output instead of returning it.
If possible, I would prefer not to redirect streams or redefine print, etc.
EDIT: got it, leaving the question for reference.
timeit("blah",seconds=True)
returns a number.
This should probably get a mention in 'timeit?'.