Seedha content par jao
🤖 Python Hindi Bot
Namaste! Main Python Hindi Bot hoon 🐍
Python ya AI se related kuch bhi type karke pucho, ya neeche se quick sawaal chuno.
WhatsApp

Stay Connected with PythonHindii

Join our WhatsApp Community to get the latest Python tutorials, coding tips, interview questions, project updates, and learning resources directly on your phone.

Join WhatsApp Community
⇧
Python Hindi Logo
Python in Hindi | Programming Education
🎓 100% Free · Hindi me · Beginner se Career tak

Python Tutorial in HindiiLearn Python Programming for Free

Python, AI, Data Analytics aur SQL ek hi jagah, simple Hindi me. Padho, browser me code chalao, projects banao aur career shuru karo.

main.py
# Python seekho, Hindi me naam = "Ravi" for i in range(3): print("Namaste", naam)
▸ python main.py
🐍 Python 🤖 AI & ML 📊 Data 🗄️ SQL

Chahe Student ho ya Professional, yahan aapke liye sab hai

Apna card chuno, seedha sahi jagah pahunch jaoge.

🎓

Student ho?

School ya college me ho? Python zero se seekho, notes aur cheat sheets ke saath.

  • Python basics se OOP tak
  • Notes, PDFs aur Cheat Sheets
  • Browser me practice, kuch install nahi
💼

Working Professional ho?

Kaam ke saath nayi skill jodo: data, SQL aur AI se apna kaam tez karo.

  • Pandas, NumPy, Excel, Power BI
  • SQL aur MySQL databases
  • Automation aur AI Tools
🚀

Job ya Career change?

Projects banao, interview ki taiyari karo aur sahi roadmap follow karo.

  • Real projects, portfolio ke liye
  • Python aur SQL interview questions
  • AI Engineer, Data Scientist roadmap

Python Hindii Kaise Kaam Karta Hai?

Ek hi jagah 4 layers: seekho, practice karo, skills banao aur career shuru karo. Har layer ek step hai, us par click karke seedha wahan pahuncho. Computer par drag karke 3D me ghumao bhi.

Layer 1 · Seekho

Python Basics se Advanced tak

Variables, loops, functions se OOP tak, sab simple Hindi me. Yahin se shuru karo.

Naye ho? 3 step me shuru karo

💻 Online Code Editor

Browser me hi code likho aur turant chalao

Koi software install nahi. Code likho, Run dabao aur result usi waqt dekho.

  • Python, Java, C, C++, JavaScript, HTML aur aur bhi languages
  • input(), graphs aur multi-file HTML project bhi chalte hain
  • Mobile aur computer, dono par chalta hai
main.py
naam = input("Naam batao: ") for i in range(3): print("Namaste", naam)
▸ python main.py
PythonJavaCC++JavaScriptHTML

Python se AI tak ka poora rasta

8 steps, ek ke baad ek. Aage-peeche ghumao aur apni stage se seedha shuru karo.

Step 1 🐍

Python Basics

IntroductionVariablesData TypesOperatorsInput & OutputConditionsLoops
Start Python →
Step 2 💻

Python Intermediate

ListsTuplesSetsDictionariesStringsModulesFile Handling
Continue Python →
Step 4 🗄️

SQL & Databases

SQL BasicsMySQLSELECTINSERTUPDATEDELETEJOIN
Learn SQL →
Step 5 📊

Data Analytics

NumPyPandasData CleaningData VisualizationMatplotlibExploratory Data Analysis
Learn Data Analytics →
Step 6 🤖

Machine Learning

ML BasicsSupervised & Unsupervised LearningRegressionClassificationModel EvaluationScikit-learn
Learn Machine Learning →
Step 7 🧠

Artificial Intelligence

AI FundamentalsGenerative AIAI ToolsPrompt EngineeringLLM ConceptsAI Automation
Explore AI →
Step 8 🚀

Projects & Career

Python ProjectsAI ProjectsData ProjectsPortfolioGitHubInterview PreparationCareer Roadmap
Build Your Career →
Step 1 / 8

Python Pass Statement in Hindi – Example, Uses & pass vs break vs continue

Python Pass Statement

Python Pass Statement

if statements, loops, functions, and classes cannot be empty in Python — but sometimes you don't have any code to put inside them yet. Put the pass statement there to avoid getting an error.

The pass Statement

Example

An empty if statement, avoided with pass:

a = 33 b = 200 if b > a: pass
Try it Yourself »

The pass statement is a null operation — nothing happens when it executes. It simply tells Python "leave this block empty for now" and lets the program keep running.

Why Use pass?

The pass statement is useful in several situations:

  • When you're sketching out code structure but haven't implemented the logic yet
  • When Python requires a statement syntactically, but no action is needed
  • As a placeholder for future code during development
  • In empty functions or classes that you plan to fill in later

pass in Development

While building a project, you might sketch out your program's structure before writing the actual logic. pass lets you do this without syntax errors.

Example

Placeholder for future implementation:

age = 20 if age < 18: pass # TODO: Add underage logic later else: print("Access granted")
Try it Yourself »

pass vs Comments

A comment is ignored by Python entirely, but pass is an actual statement that gets executed (even though it does nothing). You need pass wherever Python expects a statement — a comment alone is not enough.

Example

This will cause an error (empty code block):

score = 85 if score > 90: # This is excellent # This will raise an IndentationError
Example

This works correctly with pass:

score = 85 if score > 90: pass # This is excellent print("Score processed")
Try it Yourself »

pass with Multiple Conditions

You can use pass in any branch of an if-elif-else statement.

Example

Using pass in different branches:

value = 50 if value < 0: print("Negative value") elif value == 0: pass # Zero case - no action needed else: print("Positive value")
Try it Yourself »

pass in Other Contexts

While this page focuses on pass with if statements, it works the same way in loops, functions, and classes.

Example

Using pass in a for loop:

for i in range(5): pass print("Loop completed")
Try it Yourself »
Note: Be careful using pass inside a while loop. If the loop's condition never changes, you'll create an infinite loop that never ends.
Example

Using pass in a function:

def calculate_discount(price): pass # TODO: Implement discount logic # Function exists but doesn't do anything yet
Try it Yourself »
Example

Using pass in a class:

class Student: pass print("Student class created")
Try it Yourself »

pass vs break vs continue

Beginners often confuse pass with break and continue — but each does something completely different.

StatementWhat It Does
passDoes nothing — execution simply continues
breakStops the loop completely
continueSkips the current iteration and moves to the next one
Example

Compare all three:

for i in range(3): pass # does nothing, loop finishes normally for i in range(3): break # stops the loop immediately for i in range(3): continue # skips to the next iteration
Try it Yourself »

Exercise ?

What does the pass statement do?

It skips the entire if statement
It's a null operation - nothing happens
It raises an error

FAQ

What is pass in Python?

pass is a null statement — it performs no action when executed.

Does pass stop the program?

No. The program continues normally to the next statement.

Are pass and break the same?

No. pass does nothing, while break terminates the loop.

Are pass and continue the same?

No. continue skips the current iteration, while pass performs no action at all.

Can you use pass inside a function?

Yes. It lets you define the function now, as an empty placeholder, and add the real logic later.

Summary

pass = Do Nothing

pass is a null statement in Python that performs no action. Its main purpose is to keep empty code blocks valid and act as a placeholder for future implementation.

If you're learning Python from scratch, follow the complete step-by-step Python course in Hindi at PythonHindii.in, and practice your code anytime with our Online Python Editor & Compiler.

Related Articles

🧑‍💻 Python Coding Lab

Python code likho, run karo aur practice karo — directly browser mein.