摘要:在本教程中,您将学习如何使用 os 模块中的 remove() 函数从 Python 中删除文件。 要删除文件,您可以使用 os 内置模块中的 remove() 函数。例如,以下代码使用 os.remove() 函数删除 readme.txt 文件: import os os.remove(