Advertisements
Advertisements
प्रश्न
Give examples of namespaces with respect to Python.
लघु उत्तरीय
Advertisements
उत्तर
Examples of namespaces in Python:
Built-in namespace— contains names such asprint,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
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
