CBSE Class 12 Computer Science Question 5 of 62

Using Python Libraries — Question 5

Back to all questions
5
Question

Question 5

Assertion. Python offers two statements to import items into the current program : import and from <module> import, which work identically.

Reason. Both import and from <module> import bring the imported items into the current program.

Answer

(e)

Both Assertion and Reason are false or not fully true.

Explanation
The import <module> statement imports the entire module into the new namespace setup with same name as that of module, while the from <module> import <item> statement imports specific items from the module into the current namespace. Hence, they both are different statements.