Join Barron Stone for an in-depth discussion in this video Import tools from packages, part of Programming Foundations: Real-World Examples.
- 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 cutting boards in there,…and my casserole dishes down below.…
- Reusing functions
- Local vs. global variables
- Creating and naming custom objects
- Class inheritance
- Modules and packages
- Multidimensional lists and tuples
- Queues and stacks
- Creating and combining sets
- Storing data in dictionaries
- If/else and switch statements
- For vs. while loops
- Error handling
- Polling and event-driven programming
Skill Level Beginner
3. Class Inheritance
4. Modules and Packages
5. Lists and Tuples
6. Queues and Stacks
9. Conditional Execution
11. Error Handling
12. Polling and Event-Driven Programming
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.