0% found this document useful (0 votes)
5 views

Python_Operators_Hinglish

The document explains various types of operators in Python, including arithmetic, relational, logical, assignment, and bitwise operators. It provides examples of each type, demonstrating their usage in Python code. The document serves as a basic guide for understanding how operators function in Python programming.

Uploaded by

k.nitish001705
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Python_Operators_Hinglish

The document explains various types of operators in Python, including arithmetic, relational, logical, assignment, and bitwise operators. It provides examples of each type, demonstrating their usage in Python code. The document serves as a basic guide for understanding how operators function in Python programming.

Uploaded by

k.nitish001705
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

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.

You might also like