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 programming tutorial in Hindi banner Python code learning illustration Hindi Python student coding illustration Python data code pattern background

Python Tutorial in HindiiLearn Python Programming for Free

Learn Python from Beginner to Advanced in simple Hindi.

print("Namaste Python!")
# Variable banana
naam = "Ankit"
umar = 25
 
for i in range(3):
  print("Sikho!")
 
# Output:
Sikho! Sikho! Sikho!

Why Students Learn Here

📚

Structured Tutorials

Beginner se Advanced tak step-by-step organized lessons.

💻

Practical Code

Real examples aur hands-on code jo actually samajh aaye.

🧠

Python + AI Path

Ek clear roadmap jo Python se AI tak le jaata hai.

🚀

Projects & Career

Portfolio-ready projects aur interview preparation.

Ye Kaise Kaam Karta Hai

Hindi mein Python, AI aur Data Skills seekhne ka sabse simple tareeka.

📘

Seekhein

Beginner se Advanced tak, best curated tutorials aur guides Hindi mein.

💻

Practice Karein

Real code examples aur mini-projects ke through hands-on practice karein.

💬

Judein

WhatsApp community se judkar apne doubts clear karein, akele nahi seekhenge.

Python to AI Learning Roadmap

Step-by-step learning path from Python basics to AI, Data Science and career-ready projects.

1
🐍

Python Basics

Introduction, Variables, Data Types, Operators, Input & Output, Conditions, Loops, Functions

Start Python →
2
💻

Python Intermediate

Lists, Tuples, Sets, Dictionaries, Strings, Functions, Modules, File Handling, Exception Handling

Continue Python →
3
⚙️

Advanced Python

OOP, Iterators, Generators, Decorators, Regular Expressions, APIs, Automation, Virtual Environments

Learn Advanced Python →
4
🗄️

SQL & Databases

SQL Basics, MySQL, SELECT, INSERT, UPDATE, DELETE, JOIN, GROUP BY, Database Projects

Learn SQL →
5
📊

Data Analytics

NumPy, Pandas, Data Cleaning, Data Visualization, Matplotlib, Exploratory Data Analysis

Learn Data Analytics →
6
🤖

Machine Learning

ML Basics, Supervised & Unsupervised Learning, Regression, Classification, Model Evaluation, Scikit-learn

Learn Machine Learning →
7
🧠

Artificial Intelligence

AI Fundamentals, Generative AI, AI Tools, Prompt Engineering, LLM Concepts, AI Automation

Explore AI →
8
🚀

Projects & Career

Python Projects, AI Projects, Data Projects, Portfolio, GitHub, Interview Preparation, Career Roadmap

Build Your Career →

Python Lists Complete Guide in Hindi | Append, Insert & Pop | Python Hindi

Python Lists Complete Guide in Hindi - Append, Insert and Pop
Python Lists

अब तक हमने ऐसे variables बनाए जिनमें एक बार में सिर्फ एक ही value store होती थी। लेकिन real programs में अक्सर हमें एक साथ कई values — जैसे students के नाम, products की price, या marks की पूरी list — रखनी होती है। इसके लिए Python में List इस्तेमाल होती है।

List Python का सबसे ज्यादा इस्तेमाल होने वाला data structure है। अगर आपने अभी Python Strings in Hindi नहीं पढ़ा है, तो पहले वो article पढ़ना उपयोगी रहेगा, क्योंकि indexing का concept दोनों में एक जैसा है। Examples खुद run करने के लिए हमारा Online Python Editor & Compiler use कर सकते हैं।

🎥 Video में पूरा Topic समझें

Python List क्या है?

List Python का एक data structure है, जिसमें एक साथ कई values को एक ही variable में, एक क्रम (order) में रखा जा सकता है।

सरल भाषा में — List एक ऐसा container है जिसमें कई values एक साथ रखी जाती हैं।
Example
fruits = ["apple", "banana", "mango"] print(fruits)

Output:

['apple', 'banana', 'mango']
Try it Yourself »

List की जरूरत क्यों पड़ती है?

अगर हमें 5 students के नाम store करने हों, तो बिना list के हमें 5 अलग-अलग variables बनाने पड़ेंगे — जो बड़े data के लिए practical नहीं है।

बिना List के
student1 = "Ankit" student2 = "Rahul" student3 = "Priya" student4 = "Aman" student5 = "Sneha"
List के साथ
students = ["Ankit", "Rahul", "Priya", "Aman", "Sneha"]

List से एक ही variable में सारे names आसानी से रखे और manage किए जा सकते हैं — इससे code छोटा और organized रहता है।

List Create कैसे करें?

List बनाने के लिए values को square brackets [ ] के अंदर, comma से अलग करके लिखा जाता है।

Syntax
list_name = [value1, value2, value3]
Example
numbers = [10, 20, 30, 40] print(numbers)

Output:

[10, 20, 30, 40]
Try it Yourself »

List में Multiple Values Store करना

Example
colors = ["red", "green", "blue", "yellow"] print(colors) print(len(colors))

Output:

['red', 'green', 'blue', 'yellow'] 4
Try it Yourself »

Different Types की Values List में रखना

Python की list में सिर्फ एक जैसी values नहीं, बल्कि अलग-अलग data types की values भी एक साथ रखी जा सकती हैं।

Example
mixed_list = ["Ankit", 25, True, 5.5] print(mixed_list)

Output:

['Ankit', 25, True, 5.5]

यहाँ एक ही list में string, integer, boolean और float value एक साथ मौजूद हैं।

Try it Yourself »

List Indexing

List के हर element की अपनी एक position होती है, जिसे index कहते हैं। Index से हम किसी specific element को access कर सकते हैं।

fruits = ["apple", "banana", "mango", "orange"] Index → 0 1 2 3

Positive Indexing

Positive indexing में counting 0 से शुरू होकर आगे बढ़ती है — पहला element index 0 पर होता है।

Example
fruits = ["apple", "banana", "mango", "orange"] print(fruits[0]) print(fruits[2])

Output:

apple mango
Try it Yourself »

Negative Indexing

Negative indexing में counting आखिर से होती है — last element का index -1 होता है।

fruits = ["apple", "banana", "mango", "orange"] Index → -4 -3 -2 -1
Example
fruits = ["apple", "banana", "mango", "orange"] print(fruits[-1]) print(fruits[-2])

Output:

orange mango
Try it Yourself »

List Element को Access करना

Example
marks = [85, 90, 78, 92] print("First mark:", marks[0]) print("Last mark:", marks[-1])

Output:

First mark: 85 Last mark: 92
Try it Yourself »

List Element को Update करना

List के किसी element को उसके index के through directly नई value assign करके update किया जा सकता है।

Example
fruits = ["apple", "banana", "mango"] fruits[1] = "grapes" print(fruits)

Output:

['apple', 'grapes', 'mango']

Index 1 पर मौजूद "banana" को "grapes" से replace कर दिया गया।

Try it Yourself »

append() Method

append() का इस्तेमाल list के आखिर में एक नया element जोड़ने के लिए किया जाता है।

Example
fruits = ["apple", "banana"] fruits.append("mango") print(fruits)

Output:

['apple', 'banana', 'mango']
Try it Yourself »

insert() Method

insert() से किसी element को list में किसी specific position पर जोड़ा जा सकता है।

Syntax
list_name.insert(index, value)
Example
fruits = ["apple", "banana", "mango"] fruits.insert(1, "orange") print(fruits)

Output:

['apple', 'orange', 'banana', 'mango']

"orange" index 1 पर insert हो गया, और बाकी elements एक position आगे shift हो गए।

Try it Yourself »

remove() Method

remove() से किसी दिए गए value को list से हटाया जाता है (index से नहीं, actual value से)।

Example
fruits = ["apple", "banana", "mango"] fruits.remove("banana") print(fruits)

Output:

['apple', 'mango']
Try it Yourself »

pop() Method

pop() list में से किसी element को index के आधार पर हटाता है, और अगर कोई index न दिया जाए तो आखिरी element हटा देता है। साथ ही यह हटाई गई value को return भी करता है।

Example — बिना index दिए
fruits = ["apple", "banana", "mango"] removed = fruits.pop() print(fruits) print("Removed:", removed)

Output:

['apple', 'banana'] Removed: mango
Try it Yourself »
Example — index देकर
fruits = ["apple", "banana", "mango"] removed = fruits.pop(0) print(fruits) print("Removed:", removed)

Output:

['banana', 'mango'] Removed: apple
Try it Yourself »
Methodकाम
append(value)List के आखिर में element जोड़ता है
insert(index, value)दी गई position पर element जोड़ता है
remove(value)दी गई value को हटाता है
pop(index)दिए index (या आखिरी) element को हटाकर return करता है

len() से List की Length निकालना

len() function से यह पता चलता है कि list में कुल कितने elements हैं।

Example
fruits = ["apple", "banana", "mango", "orange"] print(len(fruits))

Output:

4
Try it Yourself »

in से Element Check करना

in keyword से यह check किया जा सकता है कि कोई value list में मौजूद है या नहीं — यह True या False return करता है।

Example
fruits = ["apple", "banana", "mango"] print("banana" in fruits) print("grapes" in fruits)

Output:

True False
Try it Yourself »
Example — if के साथ
fruits = ["apple", "banana", "mango"] if "mango" in fruits: print("Mango list में मौजूद है") else: print("Mango list में नहीं है")

Output:

Mango list में मौजूद है
Try it Yourself »

Practical Student List Example

Example
students = ["Ankit", "Rahul", "Priya"] # नया student जोड़ना students.append("Sneha") # बीच में एक student जोड़ना students.insert(1, "Aman") # कोई student हटाना students.remove("Rahul") print("Final List:", students) print("Total Students:", len(students)) print("Priya list में है:", "Priya" in students)

Output:

Final List: ['Ankit', 'Aman', 'Priya', 'Sneha'] Total Students: 4 Priya list में है: True

यहाँ append(), insert(), remove(), len() और in — सारे एक साथ इस्तेमाल किए गए हैं।

Try it Yourself »

Common List Mistakes

❌ Index Out of Range
fruits = ["apple", "banana"] print(fruits[5]) # IndexError

List में सिर्फ 2 elements हैं (index 0 और 1), इसलिए index 5 exist ही नहीं करता।

✅ सही तरीका
if len(fruits) > 5: print(fruits[5]) else: print("Index मौजूद नहीं है")
❌ remove() में ऐसी value देना जो list में है ही नहीं
fruits = ["apple", "banana"] fruits.remove("grapes") # ValueError
✅ सही तरीका — पहले check करें
if "grapes" in fruits: fruits.remove("grapes") else: print("Value मौजूद नहीं है")
❌ remove() और pop() को Confuse करना

remove() को value चाहिए (जैसे "banana"), जबकि pop() को index चाहिए (जैसे 0) — दोनों अलग चीज़ें expect करते हैं।

❌ Negative Index को गलत समझना
fruits = ["apple", "banana", "mango"] print(fruits[-4]) # IndexError

List में सिर्फ 3 elements हैं, तो negative index सिर्फ -1 से -3 तक ही valid है।

Exercise ?

List के आखिर में नया element जोड़ने के लिए कौन सा method इस्तेमाल होता है?

insert()
append()
remove()

Python List Coding Challenge

अब खुद अपने Online Python Editor में इन challenges को solve कीजिए:

  1. अपने 5 favorite movies की एक list बनाइए और उसे print कीजिए।
  2. उस list में append() से एक नई movie जोड़िए।
  3. insert() से एक movie को list के दूसरे position पर जोड़िए।
  4. remove() से कोई एक movie हटाइए।
  5. pop() से list का आखिरी element हटाकर print कीजिए।
  6. len() से बताइए कि आखिर में list में कितनी movies बची हैं।
  7. in keyword से check कीजिए कि कोई specific movie अभी भी list में है या नहीं।

Quick Revision

ConceptSyntax / Example
List बनानाfruits = ["apple", "banana"]
Positive Indexingfruits[0] → पहला element
Negative Indexingfruits[-1] → आखिरी element
Element Updatefruits[1] = "grapes"
append()आखिर में element जोड़ता है
insert()किसी position पर element जोड़ता है
remove()value के आधार पर element हटाता है
pop()index के आधार पर element हटाता है
len()List की length बताता है
inElement मौजूद है या नहीं, check करता है

FAQ

Python में List क्या है?

List Python का एक data structure है जिसमें एक साथ कई values को एक ही variable में, एक क्रम में रखा जा सकता है।

append() और insert() में क्या फर्क है?

append() हमेशा list के आखिर में element जोड़ता है, जबकि insert() से किसी भी specific position पर element जोड़ा जा सकता है।

remove() और pop() में क्या फर्क है?

remove() को element की value देनी होती है, जबकि pop() को index दिया जाता है (या कुछ न दिया जाए तो वह आखिरी element हटाता है) और हटाई गई value return भी करता है।

क्या एक List में अलग-अलग data types की values रख सकते हैं?

हाँ। Python की list में string, integer, float, boolean जैसी अलग-अलग data types की values एक साथ रखी जा सकती हैं।

List में किसी element का पता कैसे लगाएं कि वह मौजूद है या नहीं?

in keyword का इस्तेमाल करके पता लगाया जा सकता है — यह True या False return करता है।

Summary

List = एक साथ कई values को व्यवस्थित तरीके से रखने वाला container।

इस article में आपने सीखा कि Python List क्या है, इसे कैसे बनाते हैं, positive और negative indexing कैसे काम करते हैं, elements को access और update कैसे करें, और append(), insert(), remove(), pop(), len() व in जैसे common operations कैसे इस्तेमाल होते हैं।

List Python का सबसे ज्यादा इस्तेमाल होने वाला data structure है, इसलिए इसे अच्छी तरह practice करना आगे के topics — जैसे Tuples, Dictionaries और Loops के साथ काम करना — काफी आसान बना देगा। अब ऊपर दिया गया coding challenge खुद अपने Online Editor में solve करें।

Related Articles

🧑‍💻 Python Coding Lab Python code likho, run karo aur practice karo — directly browser mein.