Dear Stackoverflow moderators: everything I have tried din't work for me.
I have the following Code
def add_song():
song = filedialog.askopenfilenames(initialdir=r'C:\Users\kevin\Music')
# add multiple songs
for song in song:
# Define the name which should be shown in the textbox
song.replace(r'C:\Users\kevin\Music', " ")
song.replace(".mp3", " ")
# place the song in the textbox, textbox name = playlist
playlist.insert(END,song)
I have already tried it with the replace method, but it didn't work. This is the output in the textbox, but it should only display the song title, without the path and without the .mp3. Also very important: it should work, however what the song path is. I hope you can help me. https://i.stack.imgur.com/6NNmj.png