Python Programming - Reading and Writing Files - Discussion
Discussion Forum : Reading and Writing Files - General Questions (Q.No. 10)
10.
How can you check if a file named "data.txt" exists in a directory using Python?
Answer: Option
Explanation:
The
os.path.exists()
function checks if a file exists in a directory.
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers