a = ["Its_My_Life_3:44","Say_It_Isn't_So_3:33","Thank_You_for_Loving_Me_5:09"]
b = []
我想b看起来像这样
b = ["Its My Life","Say It Isn't So","Thank You for Loving Me"]
这是我正在努力使用的代码,我正在努力寻找一个只会附加歌曲名称、替换_为" "而不包含数字的条件。我知道我可以用格式做一些事情并替换,但我无法弄清楚。
for song in a:
b.append(song[0:8)]) #
print(b)
一只萌萌小番薯
ITMISS
相关分类