Q. Which function checks if a file exists?

  • (A) os.exists()
  • (B) file.exist()
  • (C) os.path.exists()
  • (D) path.check()
πŸ’¬ Discuss
βœ… Correct Answer: (C) os.path.exists()
Explanation: os.path.exists() returns True if the file exists.
Explanation by: Mr. Dubey
os.path.exists() returns True if the file exists.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
122
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
96%
Success Rate