Advertisements
Advertisements
प्रश्न
When are the following built-in exceptions raised? Give examples to support your answer.
NameError
टीपा लिहा
Advertisements
उत्तर
It is raised when a local or global variable name is not defined.
>>> print(name)
Traceback (most recent call last):
File "", line 1, in
print(name)
NameError: name 'name' is not definedshaalaa.com
Built-in Exceptions in Python
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
