Importing Modules

Give Feedback

This lesson explains what imports are and goes on to cover the different ways of importing Python modules. You’ll also learn the following from the lesson:

  • How to use the dir() function to inspect imported modules
  • How imports affect scope
  • How to import multiple classes or functions from a package
  • Recommendations on the best way to import packages

Comments & Discussion

Bill on March 14, 2019

You have to use modules that we all have access to.

Abhishek Saha on March 15, 2019

Really cool explanation. I’m new to python , just having basic Q - How I get to know the required module name for my work. I’m from Windows Powershell background , so whenever I need to do anything , can use find-module azure - mean I dont know what the exact module name but just using this trick , can pull all available module to import or install. Same way to explore listed commands and respective syntax available for commands. How to do this in Python, pls suggest

Become a Member to join the conversation.