Comparison Operators in Python

Fill in the blanks

In Python, comparison operators are used to compare values and determine the between them. These operators return either or False based on the comparison.



The Equal to () operator returns True if the values on both sides of the operator are equal, otherwise it returns False. For example, if x = 5 and y = 5, the expression print(x == y) would output .



In addition to equality, Python provides the Not equal to () operator, which returns True if the values on both sides are not equal. For instance, if x = 5 and y = 10, the expression print(x != y) would output .



Other comparison operators include Greater than (), which returns True if the left value is greater than the right value, and Less than (), which returns True if the left value is less than the right value. Similarly, Greater than or equal to () and Less than or equal to () check for greater or equal and less or equal conditions, respectively, returning True when the specified condition holds.

Keywords

< | true | <= | != | > | == | true | relationship | >= | true |