Hello everyone I have a database that kicks out song names with the folders and was wondering if there was a way that a python script could delete some of the text.
My data:
https://location.com/loaction/folder1/album/songname.mp3
https://location.com/loaction2/folder2/album/songname1.mp3
https://location.com/loaction3/folder3/album/songname2.mp3
https://location.com/loaction4/folder4/album/songname3.mp3
https://location.com/loaction5/folder5/album/songname4.mp3
and was wondering if there was a way to get it to look like this.
songname.mp3
songname1.mp3
songname2.mp3
songname3.mp3
songname4.mp3
Using
str.rsplit
: