In this video we discuss Comparison Operator Overloading in python
This is important part of polymorphism and OOP. The list of comparison operators overloading is achieved by functions that are given below
1. `__eq__(self, other)`: Returns True if `self` is equal to `other`.
2. `__ne__(self, other)`: Returns True if `self` is not equal to `other`.
3. `__lt__(self, other)`: Returns True if `self` is less than `other`.
4. `__le__(self, other)`: Returns True if `self` is less than or equal to `other`.
5. `__gt__(self, other)`: Returns True if `self` is greater than `other`.
6. `__ge__(self, other)`: Returns True if `self` is greater than or equal to `other`.
#pythonprogramming #python #pythontutorial
@USCodeAcademy
In questa pagina del sito puoi guardare il video online Comparison Operator Overloading in Python || Operator Overloading Part-4 della durata di ore minuti seconda in buona qualità , che l'utente ha caricato US Code Academy 02 settembre 2024, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 82 volte e gli è piaciuto 8 spettatori. Buona visione!