关闭音乐播放器。
关闭播放器。

import subprocess

print("正在关闭音乐播放器...")

# 常见音乐播放器进程名
music_players = [
    "cloudmusic.exe",   # 网易云音乐
    "QQMusic.exe",      # QQ 音乐
    "KuGou.exe",        # 酷狗音乐
    "KuwoMusic.exe",    # 酷我音乐
    "Spotify.exe",      # Spotify
    "iTunes.exe",       # iTunes
    "Music.UI.exe",     # Windows 媒体播放器/媒体应用
    "wmplayer.exe"      # Windows Media Player
]

for player in music_players:
    subprocess.run(
        ["taskkill", "/f", "/im", player],
        stdout=subprocess.DEVNULL,
        stderr=subprocess.DEVNULL
    )

result = "音乐播放器已关闭"

print(result)
