+ 3
Please find what problem here?
def d(f): def wra(): return 'yo '+f().upper() return wra def d1(f): def wra(): return 'ye '+f().title() return wra def h(): return 'hi' v=d1(d(h())) print(v) #in output it giving me function memory address. but i want real function output what i need to change can you tell me.
2 Respuestas
+ 2
print(v) will just print the function name. You need to add parentheses to actually execute the function and print the return value: print(v())
Also, h() returns a string. d() takes the return value of h() as an argument and tries to execute it (f()). So it will try to execute a string. Here you need to remove the ().
0
i dont happen to see the value "f" defined by a variable