CBSE Class 12 Computer Science Question 73 of 145

File Handling — Question 8

Back to all questions
8
Question

Question 8

If no path is given with a file name in the file open(), then the file must exist in the current directory.

Answer

True

Reason — If no path is given with a file name in the open() function in Python, then the file is assumed to be located in the current working directory. If the file is not found in the current working directory, Python will raise a 'FileNotFoundError' exception.