Open mp3 file | Sololearn: Learn to code for FREE!


Open mp3 file

I want to know how to open mp3 file in python. Help me


4/9/2021 4:01:15 AM

Akira Tatsukane

3 Answers

New Answer


Most mp3 files are in binary so i think you can open them using the "b" or "b+" mode in python. with open("test.mp3", "b") as f: # read here


You won't be able to play an mp3 file inside of SoloLearn. To do it on your PC, you will need a module that supports audio files. Here is one example: import playsound playsound.playsound('PATH_TO_MP3/sound.mp3', True)


Kawaru using native player or with libraries?