Table of Contents
Python Tutorial
Table of Contents
Python Tutorial
Identation & Comments in Hindi
python मे Identation & Comments एक basic syntex का part है इसको जाने बिना कोई भी programmer, python मे coding नहीं कर सकता……
Identation in Python
python के code में indentation देना बहुत ही जरूरी होता है, इससे code के structure समझने में आसानी होती है और बिना indentation से code में error भी आ सकता है।
indentation को देने के लिए हम tab या 4 space का use करते हैं। Generally code editor में indentation देने की जरूरत नहीं होती यह automatic दे देता है, but ना दे तो हम tab button को press करके दे सकते हैं। नीचे दिए गए syntax में आप indentation को अच्छे से समझ सकते हैं।
यहां पर पहले line का code तो start से लिखा है but दूसरी line में हमने कुछ space दिया है इसी को indentation कहते हैं.
Comments in Python
जब हम code editor में code लिखते हैं तो उसका execution होता है but हम चाहते हैं कि इसमें कुछ लाइन ऐसी लिखी हो जिसका execution ना हो तो हम comment का use करते हैं, यह लाइन सिर्फ code को समझने के लिए लिखी जाती है। python में 2 type के comments होते हैं।
1. Single line comment
जब हम एक ही लाइन में comment देना चाहते हैं तो single line comment का use करते हैं। इसके लिए # press करके कुछ भी लिखते हैं तो यह एग्जीक्यूट नहीं होता है।
1. Multi line comment
जब हमें एक से ज्यादा लाइन में comment लिखना होतो हम multi line comment का use करते हैं, इसके लिए triple quotes ( ‘‘‘ or “““ ) का use करते हैं।
नीचे syntax में single line comment और multi line comment को अच्छे से समझ सकते हैं.
उम्मीद करते है कि आपको python मे Identation & Comments का use समझ मे या गया होगा । अपने 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...