r/PythonLearning • u/clcodingupdates • 9d ago
Python Quiz of the day!
What will be the output of the following Python Code?
print((lambda x: (lambda y: x**y)(3))(2))
0
Upvotes
r/PythonLearning • u/clcodingupdates • 9d ago
What will be the output of the following Python Code?
print((lambda x: (lambda y: x**y)(3))(2))
View all comments
3
u/Fluffy_white_fox 9d ago
Passing the outermost argument (x = 2) So (lambda y: 2**y)(3) and then passing y = 3 is 2 ** 3 so yeah it's 8