def timeit(func): from time import time def wrapper(*args, **kwargs): t = time() func(*args, **kwargs) print(func.__name__, time() - t) return wrapper