0
Why I am getting an error
I want to use dec decorate function in my code but I can't. Anyone plss explain why??? https://code.sololearn.com/c9kHIk8pgrCv/?ref=app https://code.sololearn.com/c9kHIk8pgrCv/?ref=app
4 Answers
+ 3
def dec(func):
def warp(n):
print("started")
for i in func(n):
print(i)
print("ended")
return warp
eve=dec(even)
eve(6)
0
~ swim ~ you are providing print function in decorater function is good. But Can I get output by putting print(even(6)) at last line of code. How can I achieve this???