🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

Python रनटाइम पर गुमनाम (anonymous) functions बनाने के लिए जिस construct का उपयोग करता है, उसे क्या कहा जाता है?

Python supports the creation of anonymous functions at runtime, using a construct called —–

A
pi
B
anonymous
C
lambda
D
none of the mentioned
Explanation

Python में anonymous functions (जिनका कोई नाम नहीं होता) बनाने के लिए lambda keyword का उपयोग किया जाता है।

In Python, the construct used to create anonymous functions at runtime is called lambda.


🔹 Example / उदाहरण:

 
# Lambda function to add two numbers
add = lambda x, y: x + y
print(add(5, 3)) # Output: 8

यहाँ lambda x, y: x + y एक anonymous function है जिसे हमने add नाम से reference दे दिया है।

Correct Answer: C) lambda

Latest Updates