DEV Community

Cover image for How to make Music Player in Python

Posted on • Updated on • Originally published at

How to make Music Player in Python

Hello Programmers
Originally posted here with detail:

# Music player in python

from pygame import mixer

# --------------------------Path of your music"PYAR-HUA-IKRAAR-HUA.mp3")

while True:
    print("Press 'p' to pause")
    print("Press 'r' to resume")
    print("Press 'v' set volume")
    print("Press 'e' to exit")

    ch = input("['p','r','v','e']>>>")

    if ch == "p":
    elif ch == "r":
    elif ch == "v":
        v = float(input("Enter volume(0 to 1): "))
    elif ch == "e":

# Follow @code_snail
Enter fullscreen mode Exit fullscreen mode

For more detailed and step by step visit: How to make music player in Python

Top comments (0)