+ 11
Python: I expected output 6
7 Réponses
+ 7
def addfinkeln3(x,y,z):
d=lambda x1,y1,z1:z1+y1+x1
return d(x,y,z)
print( addfinkeln3(1,2,3))
+ 4
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 yes...a bit...it debugs my prog.
But why was it syntactically correct?
+ 3
boolean not what I wanted.
I wanted to break into functions with one argument
+ 3
def addcurrying(x):
return lambda y: lambda z:x+y+z
x = addcurrying(4)
print(x(2)(1))
+ 2
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 that's it!
But it is still not currying.
Anyways: I don't see any sense in python currying
+ 1
Done buddy you were passing string argument ,tested with integer arguments
https://code.sololearn.com/cLAvxYLSho1I/?ref=app
+ 1
It was correct before because functions are first class citizens in python