Computer Science
Which command(s) creates a separate namespace for each of the imported module ?
- import <module>
- import <module1>, <module2>
- from <module> import <object>
- from <module> import *
Python Libraries
1 Like
Answer
import <module>
import <module1>, <module2>
Reason —
import <module>
— This syntax is used to import an entire module. It creates a new namespace with the same name as that of the module.import <module1>, <module2>
— This syntax is used to import multiple modules. It creates separate namespaces for each module, with names corresponding to the module names.
Answered By
1 Like
Related Questions
The help <module> statement displays …………… from a module.
- constants
- functions
- classes
- docstrings
Which command(s) modifies the current namespace with the imported object name ?
- import <module>
- import <module1>, <module2>
- from <module> import <object>
- from <module> import *
Which of the following random module functions generates a floating point number ?
- random()
- randint()
- uniform()
- all of these
Which of the following random module functions generates an integer ?
- random()
- randint()
- uniform()
- all of these