Python Basic Tutorials

Python is a high level general purpose programming language which has a clear/easy learning curve. Python programming language is massively used in various domains like Artificial Intelligence, Data Science, Web Development, Utilities Tools and Scripts and many more

Python is a Programming language, and the default Python we use is written in C programming language which is also referred to as CPython (Python implementation in C). There are various implementation of Python Programming language i.e Jython(in JAVA), Skulpt(in JS) e.t.c

To make everything easy: We refer CPython as Python

Python Relational Operators

Relational operators are those operators that are used to find out the relation between two operands. It returns True or False according to the condition.

Operators Operator meanings Examples
>(Greater than) True if the left-hand side operand is greater than RHS one. >>> 6>1
True
<(Less than) True if the right-hand side operand is greater than LHS one. >>>1<6
True
==(Equal to) True if both the operands are equal. >>>2==2
True
>=(Greater than or equal to) True if the left operand is greater than or equal to the right. >>>5>=4
True
<=(Less than or equal to) True if the left operand is less than or equal to the right. >>>6<=6
True
!=(Not equal to) True if operands are not equal. >>>5!=5
False
Examples
    
>>>x = 45
>>>y = 10

>>>print('x > y is',x>y)
   x > y is True

>>>print('x < y is',x<y)
   x < y is False

>>>print('x == y is',x==y)
   x == y is False

>>>print('x != y is',x!=y)
   x!=y is True

>>>print('x >= y is',x>=y)
   x >= y is True

>>>print('x <= y is',x<=y)
   x <= y is False