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 125 views
125 views asked Jun 19, 2020 by avibootz
2 answers 206 views
206 views asked Nov 26, 2018 by avibootz
1 answer 239 views
1 answer 94 views
94 views asked Jul 27, 2023 by avibootz
...