comparison operations in python
there are 8 types comparison operations in python x < y x <= y x > y x >= y x == y x != y x is y x is not y < operation will return true if y is strictly greater than x. otherwise false. <= operation will return true if y is greater than x or equal to x. otherwise false. > operation will return true if y is strictly less than x. otherwise false. >= operation will return true if y is less than x or equal to x. otherwise false. and when you try to use above 4 operations, x and y have to be same data type. otherwise, TypeError will be raised. == operation will return true if x and y are same that means the value of them will be evaluated not object itself. != operation will return true if x and y are not same. otherwise, false. is operation will return true if x and y are same object. otherwise, false. is not operation will return true if x and y are not same object. otherwise false. I will show you example code to help you understand easier