हिंदी

Give examples of namespaces with respect to Python.

Advertisements
Advertisements

प्रश्न

Give examples of namespaces with respect to Python.

लघु उत्तरीय
Advertisements

उत्तर

Examples of namespaces in Python:

  • Built-in namespace — contains names such as print, len, max, etc.
  • Global namespace — contains names created at the top level of a module/program.
  • Local namespace — contains names created inside a function when it is called.
  • Class/instance namespace — contains attributes and methods of a class or an object.
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 3: Classes in Python - EXERCISE [पृष्ठ ६२]

APPEARS IN

सीबीएसई Computer Science with Python [English] Class 12
अध्याय 3 Classes in Python
EXERCISE | Q 2. b. | पृष्ठ ६२
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×