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 Logical Operators in Hindi ๐Ÿ”ฅ | and, or, not Explained | Python Course 2026 Episode 14




Python เคฎें Logical Operators: and, or, not เค•ी เคธंเคชूเคฐ्เคฃ เค—ाเค‡เคก

เคจเคฎเคธ्เคคे! เค†เคœ เคนเคฎ Python เค•े เคธเคฌเคธे เคฎเคนเคค्เคตเคชूเคฐ्เคฃ topics เคฎें เคธे เคเค• เค•े เคฌाเคฐे เคฎें เคฌाเคค เค•เคฐेंเค—े - Logical Operators। เคฏเคฆि เค†เคช Python เคธीเค– เคฐเคนे เคนैं เคคो เคฏเคน concept เค†เคชเค•े เคฒिเค เคฌเคนुเคค เคœเคฐूเคฐी เคนै। Logical operators เค•ा เค‰เคชเคฏोเค— เค•เคฐเค•े เค†เคช complex conditions เคฌเคจा เคธเค•เคคे เคนैं เค”เคฐ เค…เคชเคจे programs เค•ो เค…เคงिเค• powerful เคฌเคจा เคธเค•เคคे เคนैं।

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

Logical operators เค•ा เค‰เคชเคฏोเค— boolean values (True/False) เค•े เคธाเคฅ เค•ाเคฎ เค•เคฐเคจे เค•े เคฒिเค เค•िเคฏा เคœाเคคा เคนै। เคฏे operators เค†เคชเค•ो multiple conditions เค•ो combine เค•เคฐเคจे เคฎें เคฎเคฆเคฆ เค•เคฐเคคे เคนैं। Python เคฎें เคฎुเค–्เคฏเคคः เคคीเคจ เคช्เคฐเค•ाเคฐ เค•े logical operators เคนोเคคे เคนैं:

  • and - เคฆोเคจों conditions เค•ो check เค•เคฐเคคा เคนै
  • or - เค•เคฎ เคธे เค•เคฎ เคเค• condition เค•ो check เค•เคฐเคคा เคนै
  • not - condition เค•ो reverse เค•เคฐเคคा เคนै

1. AND Operator เค•ो เคธเคฎเคें

and operator เคคเคฌ True return เค•เคฐเคคा เคนै เคœเคฌ เคฆोเคจों conditions True เคนों। เค…เค—เคฐ เค•ोเคˆ เคญी เคเค• condition False เคนै เคคो result False เคนोเค—ा।

AND Operator เค•ा Syntax:

condition1 and condition2

AND Operator เค•े Truth Table:

  • True and True = True
  • True and False = False
  • False and True = False
  • False and False = False

AND Operator เค•ा เคต्เคฏाเคตเคนाเคฐिเค• เค‰เคฆाเคนเคฐเคฃ:

# เค‰เคฆाเคนเคฐเคฃ 1: Simple AND operation
age = 25
marks = 85

if age >= 18 and marks >= 80:
    print("เค†เคช scholarship เค•े เคฒिเค eligible เคนैं!")
else:
    print("เค†เคช scholarship เค•े เคฒिเค eligible เคจเคนीं เคนैं।")
# Output: เค†เคช scholarship เค•े เคฒिเค eligible เคนैं!


# เค‰เคฆाเคนเคฐเคฃ 2: Multiple conditions เค•े เคธाเคฅ AND
username = "admin"
password = "12345"

if username == "admin" and password == "12345":
    print("เคฒॉเค—िเคจ เคธเคซเคฒ เคฐเคนा!")
else:
    print("เค—เคฒเคค username เคฏा password")
# Output: เคฒॉเค—िเคจ เคธเคซเคฒ เคฐเคนा!


# เค‰เคฆाเคนเคฐเคฃ 3: Variable assign เค•เคฐเคคे เคนुเค
x = 10
result = (x > 5) and (x < 15)
print(result)  # Output: True

2. OR Operator เค•ो เคธเคฎเคें

or operator เคคเคฌ True return เค•เคฐเคคा เคนै เคœเคฌ เค•เคฎ เคธे เค•เคฎ เคเค• condition True เคนो। เคฆोเคจों conditions False เคนोเคจे เคชเคฐ เคนी result False เคนोเคคा เคนै।

OR Operator เค•ा Syntax:

condition1 or condition2

OR Operator เค•े Truth Table:

  • True or True = True
  • True or False = True
  • False or True = True
๐Ÿง‘‍๐Ÿ’ป Python Coding Lab

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