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

Assignment Operators in Python Explained in Hindi | Complete Python Course 2026



```html

Python เคฎें Assignment Operators เค•ो เคธเคฎเคें - Complete Guide 2026

Python Assignment Operators เค•िเคธी เคญी เคช्เคฐोเค—्เคฐाเคฎ เคฎें variables เค•ो values assign เค•เคฐเคจे เค•े เคฒिเค เคธเคฌเคธे เคฎเคนเคค्เคตเคชूเคฐ्เคฃ operators เคนैं। เค…เค—เคฐ เค†เคช Python เคธीเค– เคฐเคนे เคนैं เคคो assignment operators เค•ी เคชूเคฐी เคธเคฎเค เคนोเคจा เคฌเคนुเคค เคœเคฐूเคฐी เคนै। เค‡เคธ article เคฎें เคนเคฎ เคธเคญी assignment operators เค•ो เคตिเคธ्เคคाเคฐ เคธे เคธเคฎเคेंเค—े।

Assignment Operators เค•्เคฏा เคนैं?

Assignment operators เค•ा เค‰เคชเคฏोเค— variables เคฎें values เค•ो store เค•เคฐเคจे เค•े เคฒिเค เค•िเคฏा เคœाเคคा เคนै। เคฏे operators เคฆाเคˆं เค“เคฐ เค•ी value เค•ो เคฌाเคˆं เค“เคฐ เค•े variable เคฎें assign เค•เคฐเคคे เคนैं। Python เคฎें เค•เคˆ เคช्เคฐเค•ाเคฐ เค•े assignment operators เคนोเคคे เคนैं เคœो เคตिเคญिเคจ्เคจ เค•ाเคฐ्เคฏ เค•เคฐเคคे เคนैं।

Python เคฎें Assignment Operators เค•े เคช्เคฐเค•ाเคฐ

1. Simple Assignment Operator (=)

เคฏเคน เคธเคฌเคธे basic assignment operator เคนै เคœो เค•िเคธी เคญी variable เคฎें value เค•ो directly assign เค•เคฐเคคा เคนै।


# Simple Assignment
x = 10
name = "Python"
price = 99.99

print(x)      # Output: 10
print(name)   # Output: Python
print(price)  # Output: 99.99

2. Add and Assign Operator (+=)

+= operator เคชเคนเคฒे addition เค•เคฐเคคा เคนै เคซिเคฐ result เค•ो variable เคฎें assign เค•เคฐเคคा เคนै। เคฏเคน x = x + 5 เค•े เคฌเคฐाเคฌเคฐ เคนै।


# Add and Assign
x = 10
x += 5
print(x)  # Output: 15

# เคฏเคน เค‡เคธเค•े เคธเคฎाเคจ เคนै:
# x = x + 5

# Strings เค•े เคธाเคฅ
name = "Python"
name += " Programming"
print(name)  # Output: Python Programming

3. Subtract and Assign Operator (-=)

-= operator subtraction เค•เคฐเคคा เคนै เค”เคฐ เคซिเคฐ result เค•ो assign เค•เคฐเคคा เคนै।


# Subtract and Assign
x = 20
x -= 5
print(x)  # Output: 15

# เคฏเคน เค‡เคธเค•े เคธเคฎाเคจ เคนै:
# x = x - 5

y = 100
y -= 30
print(y)  # Output: 70

4. Multiply and Assign Operator (*=)

*= operator multiplication เค•เคฐเคคा เคนै เค”เคฐ เคซिเคฐ value เค•ो assign เค•เคฐเคคा เคนै।


# Multiply and Assign
x = 5
x *= 3
print(x)  # Output: 15

# เคฏเคน เค‡เคธเค•े เคธเคฎाเคจ เคนै:
# x = x * 3

quantity = 10
price = 5
total = quantity
total *= price
print(total)  # Output: 50

# String เค•े เคธाเคฅ (Repetition)
text = "Ha"
text *= 3
print(text)  # Output: HaHaHa

5. Divide and Assign Operator (/=)

/= operator division เค•เคฐเคคा เคนै। เคฏเคน เคนเคฎेเคถा float value return เค•เคฐเคคा เคนै।


# Divide and Assign
x = 20
x /= 4
print(x)  # Output: 5.0

# เคฏเคน เค‡เคธเค•े เคธเคฎाเคจ เคนै:
# x = x / 4

total_price = 100
items = 4
price_
๐Ÿง‘‍๐Ÿ’ป Python Coding Lab

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