So I'm creating a code in python 3.3 where you have to guess a song with only the first letter of the song and artist so I formatted my text file like this:
Domo23-Tyler The Creator
Happy hour-The Housemartins
Charming Man-The Smiths
Toaster-Slowthai
Two time-Jack Stauber
etc...
So I was trying to work out a way to print this but only showing the first letter of each word in the song name and the whole artist name like this:
C M-The Smiths
Justwondering if anyone could help
If your songs are stored let's say in "songs.txt" here is my solution:
One random Output: