For This Music player we used pygame library.
There are basically four steps in order to do so:-
i) Starting the mixer(initialize mixer function)
ii) Loading the song
iii) Setting the volume
iv)Start playing the song
Then using the While loop and write some conditions statements according to your requirement.
At last break the loop.