Table of Contents
Python Tutorial
Table of Contents
Python Tutorial
Lambda Function in Hindi
What is Lambda Function
Lambda Function एक anonymous (nameless) function होता है जिसे “lambda” keyword का use करके बनाया जाता है। जब हमे कोई छोटा function (जो एक ही line में define हो जाए) बनाना होता है तो हम lambda function बनाते है।
SYNTAX
lambda arguments : expression
Nested Lambda Function
जब एक lambda function के अंदर किसी दूसरे lambda function को use करते है या फिर वो lambda function किसी दूसरे function को return करता है तो उसे nested lambda function कहा जाता है।
Lambda Function with if-else
Lambda function में एक line का if-else condition यानि की ternary operator को use किया जा सकता है।
Lambda Function with List Comprehension
Lambda function को हम list comprehension (यानि list body में lambda function define करना) में use कर सकते है। इसका mostly use list transformation में किया जाता है, for example किसी number list के सारे items का square list बनाना हो तो हम इस technique से बना सकते है।
IIFE
IIFE (Immediately Invoked Function Expression) एक ऐसा function होता है जो बनते ही execute हो जाता है, but python में हम normal function (जो “def” keyword के use से बनते है) से IIFE function नहीं बना सकते, क्योंकि ऐसा करने पर syntax error आ जाएगा, इसीलिए हम lambda function का use करके IIFE function को create करते है।
उम्मीद करते है कि आपको Lanbda Function अच्छे समझ मे आ गया होगा। अपने learning को continue रखने के लिए next button पर click करे,
- All Posts
- Artificial Intelligence
- Computer Fundamentals
- Computer Networks
- Data Analytics
- Data Science
- DBMS
- Deep Learning
- Digital Electronics
- DSA with Python
- Excel
- Exercise
- Git & Github
- Machine Learning
- Matplotlib
- Natural Language Processing
- NumPy
- Operating System
- Pandas-s
- Power BI
- Python Tutorial
- Scikit-learn
- Seaborn
- SQL & MySQL

Table of Contents All Chapters 1. Personal Area Network 2. Local Area Network 3. Campus Area Network 4. Metropolitan Area...

Table of Contents All Chapters 1. Data Communication 2. Types of Data Communication 2.1. Simplex 2.2....

Table of Contents All Chapters 1. Special Logic Gate 2. XOR Gate 2.1. XOR Gate Truth Table 3....

Table of Contents All Chapters 1. Universal Logic Gates 2. NOR Gate 2.1. NOR Gate Truth Table 3....

Table of Contents All Chapters 1. Logic Gate 2. AND Gate 2.1. AND Gate Truth Table 3. OR...

Table of Contents All Chapters 1. Simplification 2. Simplification using Boolean Algebra Theorems 3. Simplification using K-map Digital Electronics...

Table of Contents All Chapters 1. Identity Laws 2. Null Laws 3. Domination Laws 4. Idempotent Laws 5. Complement Laws...