How to Import a Module Into Python

Find the module., Use: from import This will tell the script you are using specific functions from a specific module. , Use multiple functions., Use multiple modules., Import entire modules.

5 Steps 1 min read Medium

Step-by-Step Guide

  1. Step 1: Find the module.

    Locate the module that you will be importing.

    A complete list of built in modules can be found here (v2.7) and here (v3.5).
  2. Step 2: Use: from import This will tell the script you are using specific functions from a specific module.

    , You can use commas (,) to seperate functions if you are using multiple functions from one module. , To import multiple modules, you must make multiple import lines. , To import an entire module, use from import *
  3. Step 3: Use multiple functions.

  4. Step 4: Use multiple modules.

  5. Step 5: Import entire modules.

Detailed Guide

Locate the module that you will be importing.

A complete list of built in modules can be found here (v2.7) and here (v3.5).

, You can use commas (,) to seperate functions if you are using multiple functions from one module. , To import multiple modules, you must make multiple import lines. , To import an entire module, use from import *

About the Author

K

Kelly Peterson

Kelly Peterson is an experienced writer with over 11 years of expertise in lifestyle and practical guides. Passionate about sharing practical knowledge, Kelly creates easy-to-follow guides that help readers achieve their goals.

46 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: