Python Operators

Python Operators

Python mein kai tarah ke operators hote hain jo ki operations perform karte hain. Unmein se kuch operators yeh hain:

Arithmetic Operators

Yeh operators mathematical operations perform karte hain.


# Example: Arithmetic Operators
a = 10
b = 5
print(a + b)  # Output: 15
            

Comparison Operators

Yeh operators values ko compare karte hain aur boolean result (True/False) return karte hain.


# Example: Comparison Operators
a = 10
b = 5
print(a > b)  # Output: True
            

Logical Operators

Yeh operators logical conditions check karte hain.


# Example: Logical Operators
a = True
b = False
print(a and b)  # Output: False