How to delete file in Python

1 Answer

0 votes
import os

os.remove("d:\\data.bin")

print("File deleted")

'''
run:

File deleted

'''

 



answered Aug 14, 2015 by avibootz

Related questions

1 answer 201 views
201 views asked Jun 19, 2020 by avibootz
2 answers 337 views
337 views asked Nov 26, 2018 by avibootz
1 answer 324 views
1 answer 181 views
181 views asked Jul 27, 2023 by avibootz
...