+ 1
Output is 16 but how ??? Anyone can explain
def test(func,arg): return func (func (arg)) def mult(x): return x * x print(test(mult,2))
5 odpowiedzi
+ 1
Passing function as argument.. So just replace func with mult and check...
return func( func(arg))
=> mult(mult(2)
=>mult(4)
=>16
+ 1
Thanks a ton sir
+ 1
Sorry sir
0
Sagar Kumar you're welcome..
Edit:
0
Sagar Kumar no problem..