1.

How do you delete a file?(a) del(fp)(b) fp.delete()(c) os.remove(‘file’)(d) os.delete(‘file’)The question was posed to me by my college director while I was bunking the class.This interesting question is from Files topic in portion Regular Expressions and Files of Python

Answer»

Right CHOICE is (c) os.remove(‘file’)

EXPLANATION: os.remove() is USED to delete FILES.



Discussion

No Comment Found

Related InterviewSolutions