📜  python 检查文件格式 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:28.904000             🧑  作者: Mango

代码示例1
# Assuming m is a string, you can use endswith:
if m.endswith('.mp3'):
...
elif m.endswith('.flac'):
...