Python_Operators_Hinglish
Python_Operators_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
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)
**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.