sponsor

sponsor

Slider

Recent Tube

Business

Technology

Life & style

Games

Sports

Fashion

» » Relational Operators

Relational Operators

Relational OperatorSignDescription
Equal to==दो operands equal होते है तो ये True return करता है |
Not Equal to!=दो operands equal नहीं होते है तो ये True return करता है |
Less than<left operand जब right operand से छोटा होता है तो True return करता है |
Greater than>left operand जब right operand से बड़ा होता है तो True return करता है |
Less than or Equal to<=left operand जब right operand से छोटा होता है या equal होता है तो True return करता है |
Greater than or Equal to>=left operand जब right operand से बड़ा होता है या equal होता है तो True return करता है |

Equal to(==) Relational Operator in Python

Source Code :
a = 5
b = 6
print(a == b)
print(a == 5)
print((a<b) == (b>a))
Output :
False
True
True


Not Equal to(!=) Relational Operator in Python

Source Code :
a = 5
b = 6
print(a != b)
print(a != 5)
print((a<b) != (b<a))
Output :
True
False
True


Less than(<) Relational Operator in Python

Source Code :
a = 5
b = 6
print(a < b)
print(a > b)
Output :
True
False


Greater than(>) Relational Operator in Python

Source Code :
a = 5
b = 6
print(a > b)
print(a < b)
Output :
False
True


Less than or Equal to(<=) Relational Operator in Python

Source Code :
a = 5
b = 6
c = 5
print(a <= b)
print(a <= c)
Output :
True
True


Greater than or Equal to(>=) Relational Operator in Python

Source Code :
a = 5
b = 6
c = 5
print(a >= b)
print(a >= c)
Output :
False
True

«
Next
Newer Post
»
Previous
Older Post

No comments:

Leave a Reply