Ad Code

How To Play Music Through Python Program.


 How To Play Music Through Python Program.

Welcome To Codingfizz



In this tutorial we are going to learn how to play music through python code 

in just two lines of code.

Firstly, We have to install playsound module in our vs code or whatever you have used. So, write the below code in your terminal.

 pip install playsound

Now import the libraries of playsound through

 from playsound import playsound

Then give the path of music file in your computer.

Note:- The Music file name should be start from alphabets not in numeric.

 playsound("Path of the Music file")

Here is the full code of program:-

 from playsound import playsound
 playsound("Path of the Music file")

Thank You For Visit

Post a Comment

0 Comments

Ad Code