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 199 views
199 views asked Jun 19, 2020 by avibootz
2 answers 336 views
336 views asked Nov 26, 2018 by avibootz
1 answer 324 views
1 answer 179 views
179 views asked Jul 27, 2023 by avibootz
...