Q. How are following import statements different?


(a) import X

(b) from X import *

(c) from X import a, b, c


Answer =

(a) It import module X.
(b) It import all functions from the module X.
(c) It import function a, b, c from the module X.

2 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. In part c.... Is it correct to say that import module a,b,c from package X???
    Please tell....

    ReplyDelete
    Replies
    1. No. because module contain function. So a,b,c are function not module .

      Delete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post