Computer Science

Which command(s) modifies the current namespace with the imported object name ?

  1. import <module>
  2. import <module1>, <module2>
  3. from <module> import <object>
  4. from <module> import *

Python Libraries

3 Likes

Answer

from <module> import <object>
from <module> import *

Reason —

  1. from <module> import <object>— This syntax is used to import a specific object from a module into the current namespace.
  2. from <module> import * — This syntax is used to import all objects from the module into the current namespace.

Answered By

2 Likes


Related Questions