Python Programming - Reading and Writing Files - Discussion

Discussion Forum : Reading and Writing Files - General Questions (Q.No. 45)
45.
How can you check if a file named "config.ini" exists?
if isfile("config.ini"):
if exists("config.ini"):
if file_exists("config.ini"):
if os.path.file_exists("config.ini"):
Answer: Option
Explanation:
Using exists() to check if a file exists.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.