def timeit(func):
 before = time.time()
 res = func()
 return ((time.time() - before), res)

def timeit ( func ) : before = time . time ( ) res = func ( ) return ( ( time . time ( ) - before ) , res )
run some function .