From the course: Programming Foundations: Real-World Examples

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Import tools from packages

Import tools from packages - Python Tutorial

From the course: Programming Foundations: Real-World Examples

Start my 1-month free trial

Import tools from packages

- As you're searching through the existing library of Python functions, you'll probably come across the terms module and package. Modules and packages are both collections of Python functions and classes that you can import and use in programs. So the two terms often get thrown around interchangeably but there is a difference. A module refers to a single Python script which contains a handful of functions and classes related to the same task. A package is a collection of several modules which are also related to the same type of task. You can think of each of these tool boxes as modules containing different types of tools; wrenches, screw drivers, tapes and glue, et cetera. This entire shelf represents a package because it's a collection of modules which all serve a similar purpose, fixing things in my garage. Similarly, you can think of each cabinet in my kitchen as a module, because they each contain different utensils for different purposes. I keep my mixing bowls down here, my…

Contents