LoslegenKostenlos loslegen

Importing from parents

In this exercise, you will be importing a function from the utils.py module at the top of your package. A utils module is usually used for small, often unrelated, pieces of code each of which which aren't enough to justify their own module.

You'll import a function for checking the units passed to the convert_units() function. You'll use this checking function in another subpackage later. That's why we don't just put this function in one of the modules in the length subpackage.

Remember that you can open/close the folder and files overview by clicking on the icon on the left side of the editor highlighted in red. Icon with multiple files

Diese Übung ist Teil des Kurses

Developing Python Packages

Kurs anzeigen

Interaktive Übung

In dieser interaktiven Übung kannst du die Theorie in die Praxis umsetzen.

Übung starten