Python Comparison Operators || comparison operators in python, comparison operators in python in hindi

Home 👉 O level 👉 Python 👉 Unit 4


 Comparison Operators in Python

ये बाइनरी ऑपरेटर्स हैं जो दो मानों की तुलना करते हैं और True या False में परिणाम देते हैं।

These are binary operators that compare two values and result in True or False.

  • Less Than ( < )
  • Less Than or Equals To ( <= )
  • Greater Than ( > )
  • Greater Than or Equals To ( >= )
  • Equals To ( == )
  • Not Equals To ( != )

Less Than (<):-

    इस ऑपरेटर के बाएं साइड की वैल्यू यदि दाएं साइड की वैल्यू से छोटी है तो परिणाम True देता है अन्यथा False देता है। पायथन में, "less than" ऑपरेटर को कम-से-कम चिह्न (<) द्वारा दर्शाया जाता है। इसका उपयोग दो मानों की तुलना करने के लिए किया जाता है और यदि बाईं ओर का मान दाईं ओर के मान से कम है तो यह 'True' लौटाता है। यदि शर्त पूरी नहीं होती है, तो यह 'False' लौटाता है।

    Returns True if the value on the left side of this operator is less than the value on the right side, otherwise it returns False. In Python, the "less than" operator is denoted by the less-than sign (<). It is used to compare two values and returns `True` if the value on the left is less than the value on the right. If the condition is not met, it returns `False`.


syntax: x < y
example: 3 < 4
result: True

Less Than or Equals To (<=):-

    इस ऑपरेटर के बाएं साइड की वैल्यू यदि दाएं साइड की वैल्यू से छोटी या बराबर है तो परिणाम True देता है अन्यथा False देता है। पायथन में, "less than or equals to" ऑपरेटर को `<=` द्वारा दर्शाया जाता है। इसका उपयोग यह जांचने के लिए किया जाता है कि बाईं ओर का मान दाईं ओर के मान से कम या उसके बराबर है। यदि स्थिति सत्य है, तो यह 'True' लौटाती है; अन्यथा, यह 'False' लौटाता है। आप यह निर्धारित करने के लिए संख्याओं, चर या एक्सप्रेशंस की तुलना करने के लिए `<=` ऑपरेटर का उपयोग कर सकते हैं कि बायां ऑपरेंड दाएं ऑपरेंड से कम है या उसके बराबर है।

    Returns True if the value on the left side of this operator is less than or equal to the value on the right side, otherwise it returns False. In Python, the "less than or equal to" operator is represented by `<=`. It is used to check if the value on the left is less than or equal to the value on the right. If the condition is true, it returns `True`; otherwise, it returns `False`. You can use the `<=` operator to compare numbers, variables, or expressions to determine if the left operand is less than or equal to the right operand.


syntax: x <= y
example: 3 <= 4
result: True

Greater Than (>):-

    इस ऑपरेटर के बाएं साइड की वैल्यू यदि दाएं साइड की वैल्यू से बड़ी है तो परिणाम True देता है अन्यथा False देता है। पायथन में, ग्रेटर दैन ऑपरेटर का उपयोग दो मानों की तुलना करने और यह निर्धारित करने के लिए किया जाता है कि क्या बायाँ मान दाएँ मान से अधिक है। ग्रेटर दैन ऑपरेटर को ">" चिन्ह द्वारा दर्शाया जाता है। यदि बायां ऑपरेंड दाएं ऑपरेंड से बड़ा है तो यह `True` लौटाता है, और अन्यथा `False` लौटाता है। आप संख्याओं, वेरिएबल या एक्सप्रेशन की तुलना करके उनके सापेक्ष परिमाण निर्धारित करने के लिए ग्रेटर दैन ऑपरेटर का उपयोग कर सकते हैं।

    Returns True if the value on the left side of this operator is greater than the value on the right side, otherwise it returns False. In Python, the greater than operator is used to compare two values and determine if the left value is greater than the right value. The greater than operator is represented by the ">" symbol. It returns `True` if the left operand is greater than the right operand, and `False` otherwise. You can use the greater than operator to compare numbers, variables, or expressions to determine their relative magnitudes.


syntax: x > y
example: 3 > 4
result: False

Greater Than or Equals To (>=):-

    इस ऑपरेटर के बाएं साइड की वैल्यू यदि दाएं साइड की वैल्यू से बड़ी या बराबर है तो परिणाम True देता है अन्यथा False देता है। पायथन में, इस ऑपरेटर को `>=` द्वारा दर्शाया जाता है। इसका उपयोग यह जांचने के लिए किया जाता है कि बायां ऑपरेंड दाएं ऑपरेंड से बड़ा है या उसके बराबर है। यदि स्थिति सत्य है, तो यह 'True' लौटाती है; अन्यथा, यह 'False' लौटाता है।

    Returns True if the value on the left side of this operator is greater than or equal to the value on the right side, otherwise it returns False. In Python, the greater than or equals to operator is represented by `>=`. It is used to check if the left operand is greater than or equal to the right operand. If the condition is true, it returns `True`; otherwise, it returns `False`.


syntax: x >= y
example: 3 >= 4
result: False

Equals To (==):-

    इस ऑपरेटर के बाएं साइड की वैल्यू यदि दाएं साइड की वैल्यू के बराबर है तो परिणाम True देता है अन्यथा False देता है। पायथन में, "equals to" ऑपरेटर का उपयोग समानता के लिए दो मानों की तुलना करने के लिए किया जाता है। इसे दोहरे बराबर चिह्न (`==`) द्वारा दर्शाया जाता है। यह ध्यान रखना महत्वपूर्ण है कि "बराबर" ऑपरेटर (`==`) का उपयोग तुलना के लिए किया जाता है, जबकि एकल बराबर चिह्न (`=`) का उपयोग असाइनमेंट के लिए किया जाता है जब आप किसी वेरिएबल के लिए मान देना चाहते हैं।

    Returns True if the value on the left side of this operator is equal to the value on the right side, otherwise it returns False. In Python, the "equals to" operator is used to compare two values for equality. It is represented by a double equals sign (`==`). It's important to note that the "equals to" operator (`==`) is used for comparisons, whereas a single equals sign (`=`) is used for assignment when you want to assign a value to a variable.


syntax: x == y
example: 3 == 4
result: False

Not Equals To (!=):-

    इस ऑपरेटर के बाएं साइड की वैल्यू यदि दाएं साइड की वैल्यू के बराबर नहीं है तो परिणाम True देता है अन्यथा False देता है। पायथन में, "not equals to" ऑपरेटर को `!=` द्वारा दर्शाया जाता है। इस ऑपरेटर का उपयोग यह तुलना करने के लिए किया जाता है कि क्या दो मान एक दूसरे के बराबर नहीं हैं। यदि मान भिन्न हैं, तो `!=` का परिणाम `True` मिलता है, और यदि वे बराबर हैं, तो यह `False` का मूल्यांकन करता है।

    Returns True if the value on the left side of this operator is not equal to the value on the right side, otherwise it returns False. In Python, the "not equals to" operator is represented by `!=`. This operator is used to compare whether two values are not equal to each other. If the values are different, the expression using `!=` evaluates to `True`, and if they are equal, it evaluates to `False`.


syntax: x != y
example: 3 != 4
result: True






NEXT:-


---END---

Comments