What exception is raised when calling a method on None, e.g. None.upper() in Python?
Correct answer
A. AttributeError
5 views
A. AttributeError
5 views
None has no attribute upper, so AttributeError is raised.
Asked in: Python Interview Exception Handling
https://docs.python.org/3/tutorial/errors.htmlNot sure why the answer is A? Ask here and get an explanation.