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

Python Notes in Hindi (PDF) – Beginner to Advanced Complete Notes

Python Notes in Hindi: इस पोस्ट में Python programming के सभी महत्वपूर्ण concepts को सरल हिंदी, syntax और छोटे code examples के साथ समझाया गया है। यह Python notes for beginners हैं, जिन्हें पढ़कर आप fundamentals मजबूत कर सकते हैं और आगे projects, Data Science तथा AI सीख सकते हैं। पूरा Python tutorial in Hindi चैप्टर-वार देखें, और Python notes PDF के लिए नीचे दिया गया free PDF download सेक्शन देखें।

Contents

1. Python क्या है?

Python एक high-level, general-purpose programming language है। इसका syntax सरल और पढ़ने में आसान होता है। Python का उपयोग web development, automation, data analysis, artificial intelligence, machine learning, scripting और software development में किया जाता है।

पहला Python Program

print("Hello, World!")

print() function स्क्रीन पर output दिखाने के लिए इस्तेमाल होता है।

2. Python की विशेषताएँ

  • Easy to learn और readable syntax
  • Interpreted language
  • Cross-platform support (Windows, Linux, macOS)
  • Large standard library और बड़ी community
  • Automation और scripting में उपयोगी
  • Web, Data Science, और AI libraries उपलब्ध
  • Procedural, object-oriented, और functional programming का support

3. Basic Syntax, Comments, and Indentation

Python में code blocks को indentation से पहचाना जाता है। एक block के अंदर लिखी statements आमतौर पर समान indentation पर होती हैं।

# This is a comment
name = "Aman"
if name:
    print("Welcome", name)

Comments के लिए # इस्तेमाल करते हैं। Python में indentation बहुत महत्वपूर्ण है।

📖 और पढ़ें: Python Comments · Python Keywords

4. Variables और Data Types

Variable किसी value को नाम देकर store करने का तरीका है। Python में variable बनाने के लिए अलग से type declare नहीं करना पड़ता।

age = 20           # int
price = 99.50      # float
name = "Aman"      # str
is_student = True  # bool
Data TypeExampleUse
int10Integer numbers
float10.5Decimal numbers
str"Python"Text
boolTrue / FalseLogical values
NoneTypeNoneNo value / empty state
x = 25
print(type(x))  # <class 'int'>
📖 और पढ़ें: Python Variables · Python Data Types

5. Python Operators

CategoryOperators
Arithmetic+ - * / // % **
Comparison== != > < >= <=
Assignment= += -= *= /=
Logicaland/or, not
Membershipin, not in
Identityis, is not
a = 10
b = 3
print(a + b)   # 13
print(a // b)  # 3  (floor division)
print(a % b)   # 1  (remainder)
print(a ** b)  # 1000 (power)
📖 और पढ़ें: Python Operators (Complete Guide) · Arithmetic · Logical · Assignment

6. Input और Type Conversion

input() user से text input लेता है। जरूरत के अनुसार उसे int या float में बदलें।

age = int(input("Enter your age: "))
print("Next year you will be", age + 1)

Common conversions:

📖 और पढ़ें: Python User Input · Type Casting

7. If, Elif, and Else

Conditions के आधार पर अलग code चलाने के लिए if, elif और else का उपयोग होता है।

marks = 75
if marks >= 90:
    print("Grade A")
elif marks >= 60:
    print("Grade B")
else:
    print("Needs improvement")
📖 और पढ़ें: Python If Else in Hindi

8. Loops

Loops किसी काम को बार-बार करने के लिए इस्तेमाल होते हैं।

For Loop

for number in range(1, 6):
    print(number)

While Loop

count = 1
while count <= 5:
    print(count)
    count += 1

break loop को रोकता है, continue वर्तमान iteration छोड़कर अगले iteration पर जाता है।

📖 और पढ़ें: For Loop · While Loop · Break · Continue

9. Strings

String text data होता है, जिसे quotes में लिखते हैं।

text = "Python Hindii"
print(text.upper())
print(text.lower())
print(text.replace("Hindii", "Bytes"))
print(text[0])
print(len(text))

Strings immutable होती हैं, यानी existing string को सीधे बदलने के बजाय नई string value बनती है।

📖 और पढ़ें: Python Strings in Hindi

10. List, Tuple, Set, और Dictionary

List

List ordered, mutable collection है।

fruits = ["apple", "mango", "banana"]
fruits.append("orange")
fruits.remove("mango")
print(fruits[0])

Tuple

Tuple ordered collection है, जिसे बनने के बाद बदला नहीं जा सकता (immutable)।

coordinates = (10, 20)
print(coordinates[0])

Set

Set unique elements रखता है और duplicate values को एक ही बार रखता है।

numbers = {1, 2, 2, 3, 4}
print(numbers)  # duplicates are removed

Dictionary

Dictionary key-value pairs में data store करती है।

student = {"name": "Aman", "age": 20}
print(student["name"])
student["city"] = "Lucknow"
CollectionOrderedMutableDuplicates
ListYesYesAllowed
TupleYesNoAllowed
SetNo fixed orderYesNot allowed
DictionaryInsertion order preservedYesKeys unique
📖 और पढ़ें: Python Lists · Tuple · Set · Dictionary

11. Functions

Function reusable code block होता है। इसे def keyword से बनाते हैं।

def greet(name):
    return "Hello, " + name

message = greet("Aman")
print(message)

Function arguments, return values, default parameters, और scope आगे सीखने के महत्वपूर्ण topics हैं।

📖 और पढ़ें: Python Functions · *args और **kwargs · Lambda Function

12. Errors and Exception Handling

Unexpected errors को संभालने के लिए try और except इस्तेमाल किए जाते हैं।

try:
    number = int(input("Enter a number: "))
    print(100 / number)
except ValueError:
    print("Please enter a valid integer")
except ZeroDivisionError:
    print("Number cannot be zero")

13. File Handling

Python में files को open, read, write, और append किया जा सकता है। with statement file को सही तरीके से बंद करने में मदद करता है।

with open("notes.txt", "w", encoding="utf-8") as file:
    file.write("Learning Python")

with open("notes.txt", "r", encoding="utf-8") as file:
    content = file.read()
    print(content)

Common modes: r read, w write/overwrite, a append, andx create a new file.

📖 और पढ़ें: File Handling Introduction · File Read · File Write

14. OOP Basics (Class और Object)

Object-Oriented Programming में class एक blueprint है और object उसका instance होता है।

class Student:
    def __init__(self, name):
        self.name = name

    def introduce(self):
        print("My name is", self.name)

student1 = Student("Aman")
student1.introduce()

OOP के मुख्य concepts: Class, Object, Encapsulation, Inheritance, Polymorphism, और Abstraction.

📖 और पढ़ें: Python OOP · Class & Object · Constructor · Polymorphism · Encapsulation · Abstraction

15. Practice Questions

  1. दो numbers input लेकर उनका sum print करें।
  2. Number even है या odd, check करें।
  3. तीन numbers में largest number निकालें।
  4. 1 से 10 तक numbers print करें।
  5. किसी number का multiplication table print करें।
  6. List में सबसे बड़ा number खोजें।
  7. String को reverse करने का program लिखें।
  8. Function बनाकर factorial निकालें।
  9. Dictionary में student का नाम और marks store करें।
  10. Text file बनाकर उसमें data write और read करें।

Code अपने browser में चलाने के लिए Online Python Editor इस्तेमाल करें, और interview की तैयारी के लिए Top 100 Python Interview Questions पढ़ें।

16. Quick Revision

  • print() output दिखाता है।
  • input() user input लेता है।
  • Variables data store करते हैं।
  • if/elif/else decisions के लिए हैं।
  • for और while loops repetition के लिए हैं।
  • List mutable, tuple immutable, set unique values, और dictionary key-value pairs रखती है।
  • def function define करता है।
  • try/except exceptions handle करता है।
  • with open() file handling के लिए useful है।
  • Class से objects बनाए जाते हैं।
Learning Tip: केवल notes पढ़ने से programming नहीं आती। हर code example को Python में run करें, values बदलें, और अपने छोटे programs बनाएं। रोज 20–30 मिनट practice करने से concepts बेहतर समझ आते हैं।

📥 Python Notes PDF in Hindi — Free Download

Python के सभी chapters के PDF notes एक ही जगह, बिल्कुल free और हिंदी में।

Python PDF Notes Download करें Python Tutorial खोलें

Next क्या सीखें?

इन notes के बाद modules, OOP, file handling projects, SQL, NumPy, Pandas और Machine Learning की ओर बढ़ें। हर topic के कम से कम 2–3 programs खुद लिखें। आगे के लिए ये guides उपयोगी हैं: MySQL Introduction, Data Analyst Tutorial, AI Engineer Roadmap, और Python Cheat Sheet। Official reference के लिए Python official documentation देखें।

अक्सर पूछे जाने वाले सवाल (FAQ)

Python notes PDF in Hindi: कहाँ से download करें?

PythonHindii पर सभी chapters के free PDF notes PDF Library page पर उपलब्ध हैं।

Python सीखने में कितना समय लगता है?

रोज 1 घंटा practice करने पर basics लगभग 1–2 महीने में सीखे जा सकते हैं। समय आपकी practice पर निर्भर करता है।

क्या Python beginners के लिए आसान है?

हाँ। Python का syntax सरल और English जैसा है, इसलिए इसे पहली programming language के रूप में सबसे अच्छा माना जाता है।

Python सीखने के बाद क्या करें?

छोटे projects बनाएं, फिर SQL, NumPy, Pandas सीखकर Data Analyst या AI/ML की तरफ बढ़ें।

Python Hindii पर Python programming, coding examples, projects, और interview preparation के free resources पाएं। इस पेज को bookmark करें और revise करने के लिए वापस आएं।

🧑‍💻 Python Coding Lab

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