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

0

Open mp3 file

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

py

4/9/2021 4:01:15 AM

Akira Tatsukane

3 Answers

New Answer

+2

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

+1

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)

+1

Kawaru using native player or with libraries?