I\'m trying to find out how much time it takes to execute a Python statement, so I looked online and found that the standard library provides a module called timeit that pur
t = timeit.Timer("foo()", "from __main__ import foo")
Since timeit doesn't have your stuff in scope.