Import statement takes two forms, one is import <module> and second is from <module> import <object>. Why is it possible to use the objects of the imported module without dot notation in second form and not in first one.
Answer:
When the import <module> statement is used, a new namespace is created for the imported module's objects, so we must use the dot operator to refer to any imported module object. While in the second case, from <module> import <object> , no new namespace is created , rather the imported objects are added to the existing namespace so these can be referred without using dot notation.