Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: Which command is used to delete files in Python?
Answer:

OS.unlink(filename) or OS.remove(filename) are the commands used to delete files in Python Programming. Example:

import OS

OS.remove('hello.txt')

Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook