Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set the default subtitles language in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

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

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

cyberladysj on Nov. 6, 2019

Thank You Mahdi, this tutorial is excellent! I am still new to python and using python for my Cyber-sec tools. I was trying to import a module and kept getting “‘module’ object has no attibute” and this showed me how to import the module. Thank you again!

vincentstclair on Aug. 11, 2020

This is all over the place. Plan some structure and stop assuming people know what you’re talking about and explain the details. Come on

Become a Member to join the conversation.