Kodewick
Start learning →
Starter←→0 / 100

Add a song

#048StarterLists2 min

You are making a weekend playlist. Write add_song(playlist, song) to put song at the end of the playlist and return the playlist. It may start out empty.

Examples
add_song(["Sunny Road", "Blue Kite"], "Paper Moon")→['Sunny Road', 'Blue Kite', 'Paper Moon']
add_song([], "First Light")→['First Light']
main.py
def add_song(playlist, song):
    # your code here: put song at the end
    return playlist
Ctrl + Enter runs too
Result

Run tries the examples. When they look right, Submit.