This Website for Those Students who are searching for a platform to study online in their own Language Hindi, on this website they will learn all courses like IAS, programming, web designing, data science, and competitive exam preparation, etc.


Python Operators

Python Operators In Hindi

Python Operators





आज हम इस पोस्ट में python operators के बारें में पढेंगे और इसके types के बारें में जानेंगे तो चलिए शुरू करते है:-

Operators को एक Symbol के रूप में परिभाषित किया जा सकता है जो दो ऑपरेंड के बीच एक विशेष ऑपरेशन जैसे (जोड़), – (घटाव), * (गुणा), / (विभाजित),% (remainder), // (floor division), और exponent (**) आदि ऑपरेशन करने होतो इन Operators का उपयोग किया जाता है। पाइथन में निम्नलिखित ऑपरेटर होते है जैसे आप निचे Table मै देखेंगे|



  1. Arithmetic operators
  2. Comparison operators
  3. Assignment Operators
  4. Logical Operators
  5. Bitwise Operators
  6. Membership Operators
  7. Identity Operators


Arithmetic operators



Arithmetic operators का उपयोग दो operand के बीच Arithmetic operations करने के लिए किया जाता है। इसमें + (जोड़), – (घटाव), * (गुणा), / (विभाजित),% (remainder), // (floor division), और exponent (**) शामिल हैं।



Operator

Name

Example

+ Addition x + y
Subtraction x – y
* Multiplication x * y
/ Division x / y
% Modulus x % y
** Exponentiation x ** y
// Floor division x // y


Comparison operator



Comparision operators का प्रयोग दो values को compare करने के लिए किया जाता है. यह condition के अनुसार या तो true या false return करता है .
यहाँ पर हमने उदाहरण के लिए वेरिएबल x की वैल्यू 20 तथा y की वैल्यू 30 दी है. Comparision operators को निम्न table में वर्णित किया गया है।



Operator Name Example
== Equal x == y
!= Not equal x != y
> Greater than x > y
< Less than x < y
>= Greater than or equal to x >= y
<= Less than or equal to x <= y


Assignment operators



assignment operators का उपयोग left operand के लिए right expression की value को assign करने के लिए किया जाता है। assignment operators को निम्न तालिका में वर्णित किया गया है।



Operator Example Example
= x = 5 x = 5
+= x += 3 x = x + 3
-= x -= 3 x = x – 3
*= x *= 3 x = x * 3
/= x /= 3 x = x / 3
%= x %= 3 x = x % 3
//= x //= 3 x = x // 3
**= x **= 3 x = x ** 3
&= x &= 3 x = x & 3
|= x |= 3 x = x | 3
^= x ^= 3 x = x ^ 3
>>= x >>= 3 x = x >> 3
<<= x <<= 3 x = x << 3


Bitwise operator



Bitwise operator दो operand के value पर bit by bit ऑपरेशन perform करते हैं।



OPERATOR DESCRIPTION Example
& Bitwise AND x & y
| Bitwise OR x | y
~ Bitwise NOT ~x
^ Bitwise XOR x ^ y
>> Bitwise right shift x>>
<< Bitwise left shift x<<


Logical Operators



Logical operators का उपयोग मुख्य रूप से expression evaluation में निर्णय लेने के लिए किया जाता है। Python निम्नलिखित Logical operators का समर्थन करता है।



Operator Description Example
and यदि दोनों कथन सत्य हैं, तो True लौटाता है x < 5 and  x < 10
or यदि कथन में से कोई एक सत्य है तो True लौटाता है x < 5 or x < 4
not परिणाम को उल्टा करें, यदि परिणाम सही है तो False लौटाता है not(x < 5 and x < 10)


Membership Operators



Python membership operators का उपयोग डेटा संरचना के अंदर value की membership की जांच करने के लिए किया जाता है। यदि value डेटा संरचना में मौजूद है, तो resulting value true है अन्यथा यह false है।



Operator Description Example
in यदि ऑब्जेक्ट में निर्दिष्ट मान वाला कोई sequence मौजूद है, तो यह True लौटाता है| x in y
not in यदि ऑब्जेक्ट में निर्दिष्ट मान के साथ कोई sequence मौजूद नहीं है, तो यह True लौटाता है| x not in y


Identity Operators



identity python operators दो ऑब्जेक्ट्स के मैमोरी लोकेशन को compare करता है.



Operator Description Example
is यदि दोनों Variable एक ही object हैं, तो True लौटाता है| x is y
is not यदि दोनों Variable एक Object नहीं हैं, तो True लौटाता है| x is not y


तो दोस्तों आज हमने python operators के बारे मे जाना अगर आपको इस Topic से Relatate कोई भी Query हो तो Comment Box मे हम से Share कर सकते हो।

Thank You.

Previous
Next Post »

Quote

"Educationists should build the capacities of the spirit of inquiry, creativity, entrepreneurial and moral leadership among students and become their role model."

Dr. Abdual Kalam