Python Classes and Object Oriented Programming. How to sort classes in python? Implementing the __lt__ operator, along with other comparison operators, to allow sorting for our classes.
(my bad, I made a mistake in the __lt__ implementation the first time, should be numerator1 less than numerator2, not other.numerator)
Starter Code: https://github.com/ImKennyYip/python-oop/blob/master/2.%20Dunder%20Methods%20(Polymorphism)/Fraction.py
Source Code:
https://github.com/ImKennyYip/python-oop
Python Object Oriented Programming Playlist:
https://www.youtube.com/playlist?list=PLnKe36F30Y4Ykmi2jE28BZahMgPAV3Dzv
Python Data Structures and Algorithms Playlist:
https://www.youtube.com/playlist?list=PLnKe36F30Y4bcRomKi02sP9NR27KnBqCK
Python Game Programming Projects Playlist:
https://www.youtube.com/playlist?list=PLnKe36F30Y4bamRi07AOYS1qGDv_2MGMW
Subscribe for more coding tutorials !