so basically i need to have a list of songs and thei artists and the user is meant to try to guess the song name by getting the name of the artist and the first letters of each word of the song title. So far i have a programme that randomly selects a line frome a file which has the artist and then the song name but i need it to only print the name of the artist and the first letters of the song name. Could anybody help pls
im sorry if this is a bit confusing but my code looks so far like this:
with open("sfp.txt") as q:
rline = q.readlines()
print(random.choice(rline))
Aucun commentaire:
Enregistrer un commentaire