Python Object-Oriented Python Dice Roller Compare and Contrast

Bashir Orfani
Bashir Orfani
12,495 Points

We'd like to compare songs by their length,

We'd like to compare songs by their length, which is measured in whole seconds. Create an int method that should return the length of the song. Then, create the following comparison methods: eq, lt, gt, le and ge.

songs.py
class Song:
    def __init__(self, artist, title, length):
        self.artist = artist
        self.title = title
        self.length = length