def is_palindrome(n): l = str(n) return l[::] == l[::-1]
def log(func): def wrapper(*args, **kw): print('begin call:%s' % func.__name__) func(*args, **kw) print('after call:%s' % func.__name__) return wrapper