小编Ily*_*rov的帖子

python播放列表解决方案,如何完成is_repeating_playlist函数?

class Song:
    def __init__(self, name):
        self.name = name
        self.next = None

    def next_song(self, song):
        self.next = song 

    def is_repeating_playlist(self):
        """
        :returns: (bool) True if the playlist is repeating, False if not.
        """
        return None

first = Song("Hello")
second = Song("Eye of the tiger")

first.next_song(second);
second.next_song(first);
Run Code Online (Sandbox Code Playgroud)

python algorithm

3
推荐指数
2
解决办法
4044
查看次数

标签 统计

algorithm ×1

python ×1