What is namespace in python ? Can you explain in detail about best practices of using namespace in python ?
Interviews2 answers
2 Answers
A namespace is a system that has a unique name for each and every object in Python. An object might be a variable or a method. Python itself maintains a namespace in the form of a Python dictionary. Let’s go through an example, a directory-file system structure in computers. Needless to say, that one can have multiple directories having a file with the same name inside every directory. But one can get directed to the file, one wishes, just by specifying the absolute path to the file.
John BlintPosted Dec 14, 2021, 1:55 AM EST
Hello Sagar,
Please check out the below link maybe it will help you.
https://www.geeksforgeeks.org/namespaces-and-scope-in-python/
Md SarfarajPosted Aug 17, 2021, 10:59 PM EDT


