def start_end_decorator(func):
def wrapper(*args):
print('start')
result = func(*args)
print('end')
return result
return wrapper()
@start_end_decorator
def add5(x):
print(x + 5)
result = add5(5)
print(result)
Can anyone tell why it,s showing a type error because I don,t find anything wrong in it............if anyone one know the solution pls tell.....
Answers
Answered by
1
Answer:
I really don't understand this error dear
Answered by
0
Answer:
def start_end_decorator(func):
def wrapper(*args,**kwargs):
print('start')
result=func(*args,**kwargs)
print('End')
return result
return wrapper
@start_end_decorator
def add(x):
print (x)
return x+5
result=add (100)
print(result)
start
100
end
105
Explanation:
Similar questions