-1
有/home/<username>/Music/
Python代碼播放特定的歌曲,參照
無論名稱是考慮到的varible a
值在位置的文件1.mp3
,代碼會自動搜索特定的文件夾和播放特定(數字)歌曲
的代碼結構
import pygame
import time
a=1 # value assignment to <<a>> here
pygame.init()
pygame.mixer.music.load("/home/prabhat/Music/a.mp3") # file to be opened
pygame.mixer.music.play()
time.sleep(1)