• Home
  • Recent Q&A
  • Java
  • Cloud
  • JavaScript
  • Python
  • SQL
  • PHP
  • HTML
  • C++
  • Data Science
  • DBMS
  • Devops
  • Hadoop
  • Machine Learning
in Python by
Q:
How a file is deleted in Python?

1 Answer

0 votes
by
The file can be deleted by either of these commands:

os.remove(filename)

os.unlink(filename)

Related questions

+1 vote
asked Feb 14, 2021 in Python by SakshiSharma
0 votes
asked Jan 5, 2021 in JSON by GeorgeBell
...