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
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
