A

Admin • 833K Points
Coach

Q. Which error is raised when trying to open a non-existent file in 'r' mode?

  • (A) FileNotFoundError
  • (B) IOError
  • (C) KeyError
  • (D) TypeError
  • Correct Answer - Option(A)
  • Views: 24
  • Filed under category Python
  • Hashtags:

Explanation by: Admin

Trying to read a non-existent file raises FileNotFoundError.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.