import webbrowser
webbrowser.open("sample.mp3")
# If you don’t have mpg123 installed on your Linux system,
# you can install it using the following command:
"""
$ sudo apt install mpg123
"""
# For macOS, we use the following code snippet to play an mp3 file using
# os package in Python.
import os
os.system("afplay " + "sample.mp3")