Python: I expected output 6 | SoloLearn: Learn to code for FREE!

+11

Python: I expected output 6

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

7/12/2020 5:31:32 PM

Oma Falk

8 Answers

New Answer

+6

Oma Falk Brackets Needed def k(x,y,z): return (lambda x1:(lambda y1:(lambda z1:z1+y1+x1)))(z)(y)(x) print(k(1,2,3))

+4

𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 yes...a bit...it debugs my prog. But why was it syntactically correct?

+3

def addfinkeln3(x,y,z): d=lambda x1,y1,z1:z1+y1+x1 return d(x,y,z) print( addfinkeln3(1,2,3))

+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

0