February 2024
Beginner
352 pages
8h 16m
English
In this exercise, you’re going to explore how the dict works with modules. You’ve been using modules any time you use import to add “features” to your own Python source. You did this the most in Exercise 17, so it might be good to go review that exercise before you begin this one.
importThe first step is review how import works and develop that knowledge further. Take some time to enter this code into a Python file named ex26.py. You can do this in Jupyter by creating a file (left side, blue [+] button) with that name:
Listing 26.1: ex26.py
1 name = "Zed"
2 height = 74
Once you’ve created this file you can import it with this:
Listing 26.2: ex26_code.py
1 import ex26
This will bring ...
Read now
Unlock full access