CONTACT: ICQ 22233 and PM

Delete a File

AByteOfPython

Member
Messages
351
Reaction score
20
To delete a file, you must import the OS module, and run its os.remove() function:

Example
Remove the file "demofile.txt":
Code:
import os
os.remove("demofile.txt")
 
Top