Table of Contents
Python Tutorial
Table of Contents
Python Tutorial
Nested Function in Hindi
What is Nested Function
जब हम किसी function के अंदर दूसरे function को define करते है तो उसे nested function कहा जाता है।
Return Function from Function
Python में कोई function किसी दूसरे function को return कर सकता है।
Higher Order Function
ऐसा function जो किसी function को argument के रूप में ले और किसी function को return करे तो ऐसे function को Higher Order Function कहेंगे।
Function Recursion
Function मे recursion तब होता है जब हम किसी function मे ही उसी function को call करते है
SYNTEX
def function_name()
function_name()
Closure
जब एक nested function अपने enclosing function (बाहर वाला function) के variables को याद करता है जबकि enclosing function execute हो चुका हो, तो उसे Closure कहते है।
Decorator
Decorator एक ऐसा nested function है जो किसी दूसरे function के behavior को change या extend कर है, बिना उस function के code को बदले।
Decorators का use हम तब करते है जब हमे किसी function में extra functionality add करना हो, या बिना उस function के code को modify किए उसमे कोई नया behavior inject करना हो।
किसी function पर decorator को manually apply कर सकते है but अक्सर @decorator syntax किया जाता है इस syntax में हमे जिस भी function पर जो decorator apply करना हो हम simply उस function के ऊपर “@” के साथ उस decorator के name (@decorator_name) को लिख देता है।
हम जिस function पर decorator को apply करना चाहते है अगर वो function कोई arguments लेता है तो wrapper (decorator के अंदर वाला function) में “*args” और “**kwargs” लिखना जरूरी होता है।
उम्मीद करते है कि आपको Nested 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...