What happens when python encounters an import statement in a program? What would happen if there is one more import statement for the same module, already imported in the same group?
Share
What happens when python encounters an import statement in a program? What would happen if there is one more import statement for the same module, already imported in the same group?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Exaplnation:
python import statement enables the user to import particular modules in the corresponding program. ... As a soon as the interpreter encounters the import statement in the particular code, it searches for the same in the local scope and imports the module, if present in the search path.
I hope it will help you