0
Multi functions working in python
Why these two aren't same def mul(a,b,c): return a*b*c def add(b,a,c): return a+b-c def doub(lol,pol,a,b,c): return (lol(a,b,c)) + (pol(a,b,c)) print(doub(mul,add,5,7,8)) def mul(a,b,c): return a*b*c def add(b,q,c): return a+b-c def doub(lol(a,b,c),pol(a,b,c): return lol(a,b,c) + pol(a,b,c) print(doub(mul(5,7,8),add(5,7,8)))
2 Respuestas
+ 2
Because this syntax is wrong
doub(lol(a, b, c), pol(a, b, c)):
you can pass function as an argument but cannot pass with parameters
0
This means if you want to pass two functions in a single function they both must have same arguments?