0

Anybody answer the output of the code?

https://code.sololearn.com/cB4x6sNmahCl/?ref=app

7th Nov 2020, 2:23 PM
RuntimeERROR
RuntimeERROR - avatar
4 Respostas
+ 4
You know you can run the code 'yourself' and see right?
7th Nov 2020, 2:38 PM
XXX
XXX - avatar
+ 4
Netha_r2071 in that case you should always write a suitable description like "I don't understand the output of the code". Your title doesn't make much sense. Just remember this from now on. As for the explanation, it is quite simple. Every function in Python has a property __name__, which holds the name of the function. So in the program, `output` has the value `fu`, which is a function. So its `__name__` property gives the name of the function that is "fu".
7th Nov 2020, 3:04 PM
XXX
XXX - avatar
+ 1
__name__ returns the name of the actual function: other = fu # fu is the actual funtion fu1 = other print ( fu1.__name__ ). # fu
7th Nov 2020, 3:21 PM
abhinav
abhinav - avatar
0
XXX I ran, but I didn't knew how was the output happened to be! BTW, I'm not that ignorant to see and understand the output, if I can!
7th Nov 2020, 2:58 PM
RuntimeERROR
RuntimeERROR - avatar