<gh_stars>1-10
# Delete a File
import os
# os.remove("demo.txt")

# Check if a File Exists
if os.path.exists("demofile2.txt"):
    os.remove("demofile2.txt")
else:
    print("File does not exist!")

# Delete Folder
os.rmdir("sfkbd")

# Delete a File
import os
# os.remove("demo.txt")

# Check if a File Exists
if os.path.exists("demofile2.txt"):
    os.remove("demofile2.txt")
else:
    print("File does not exist!")

# Delete Folder
os.rmdir("sfkbd")
# Delete a File # os.remove("demo.txt") # Check if a File Exists # Delete Folder