[Python] i have a song playlist with .random but when i try to run the code i get a error...

Discussão em 'Python' iniciado por Stack, Junho 18, 2025.

  1. Stack

    Stack Membro Participativo

    def on_button_click():
    songs = ['C:\Users\13AlexCoates\Talia Lahoud - El Khayar El Tani (Official
    Audio) _ تاليا لحود - الخيار التاني.mp3', 'C:/Users/13AlexCoates/Akon - Chammak Challo (Lyrics).mp3', 'C:/Users/13AlexCoates/Kalam Eineh.mp3']
    random_songs = random.choice(songs)
    playsound(random_songs)
    print(f'Playing: {random_songs}')

    def blackjack():
    root = tk.Tk()
    root.title("Blackjack")
    button3 = tk.Button(root, text='Music', command=on_button_click)

    Continue reading...

Compartilhe esta Página