Spaces:
Sleeping
Sleeping
import json | |
class ListSongs: | |
def get_song_list(): | |
list_output = "" | |
with open("./swedish_christmas_songs.json", "r", encoding='utf-8') as f: | |
songs = json.load(f) | |
for song in songs: | |
list_output += "- " + song['name'][:-4].replace("_", " ") + "\n" | |
return list_output.strip() |