Jul-25-2021, 06:14 AM
test if the file exists
this works
this works
from os import path, remove def file_remover(file): if path.exists(file): remove(file) print('file removed') else: print('file does not exist') file_remover('test.pdf')
Output:file removed
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags