An object has a type which defines its attributes and methods . For example the str type define the attributes and method for a string object.
An object has also an id which is its memory address , and a value for example
To compare objects in python , we can implement python comparison methods __eq__ , __ne__ , __lt__ , __gt__ , __ge__ , __le__ . In this article we will show how to implement these methods and how they work .