Operators in Python (Hinglish)
**Operators in Python**
Operator ek symbol ya character hota hai jo kisi operation ko perform karta hai.
Python mein alag-alag type ke operators hote hain:
1. **Arithmetic Operators**
+ (Addition) - x + y
- (Subtraction) - x - y
* (Multiplication) - x * y
/ (Division) - x / y
% (Modulus) - x % y
** (Exponent) - x ** y
// (Floor Division) - x // y
2. **Relational (Comparison) Operators**
== (Equal to)
!= (Not equal to)
> (Greater than)
< (Less than)
>= (Greater than or equal to)
<= (Less than or equal to)
3. **Logical Operators**
and (Returns True if both are True)
or (Returns True if any one is True)
not (Negates the result)
4. **Assignment Operators**
= (Assign value)
+= (Add and assign)
-= (Subtract and assign)
*= (Multiply and assign)
/= (Divide and assign)
5. **Bitwise Operators** (advanced)
& (AND), | (OR), ^ (XOR), ~ (NOT), << (left shift), >> (right shift)
**Example code**
x = 10
y=3
print('x + y =', x + y)
print('x > y:', x > y)
print('x == y:', x == y)
print('x and y:', x and y)
Is code mein humne arithmetic, relational aur logical operators ka use kiya.