在Python中,你可以使用shutil模塊來刪除文件夾及其內容。以下是一個示例代碼:
shutil
import shutil # 指定要刪除的文件夾路徑 folder_path = 'path/to/your/folder' # 使用shutil.rmtree()函數刪除文件夾及其內容 shutil.rmtree(folder_path)
請注意,這將永久刪除文件夾及其所有內容,請謹慎操作。