How are following import statement different?
(i) import X (ii) from X import * (iii) from X import a,b,c

import X

It import entire X module and so everything inside the X module will be imported like functions, constant, variables.
In this way after importing the module we can use any function of X as per given syntax-

from X import *

It import entire X module with all items, but to use these items we don’t have to prefix module name.

from X import a,b,c

It will import a, b, and c from module X. and to use all these object we do not need to prefix them with X module.

error: Content is protected !!