I'm making an mp3 player in Python using tkinter and pygame. I'm completely new to coding and this in one of the first projects i'm working on. This is learning by doing. I'm trying to get the pause button to pause and unpause. All it does now is pause.
Can I use an if else statement for this? I have google back and forward for two days and tried many different solutions, but none of them have worked. This is what the code looks like now.
self.pauseButton = Button(self, text = 'Pause', command = self.pause)
def pause(self):
pygame.mixer.music.pause()
pygame.mixer.music.unpause()