100 days of code: Day 32 - import

Last modified on 2020-07-10

Source: 100-days-of-code.

I store classes in the users.py module and import the classes I need in the main program my_users.py using …

from users import User, Superuser

# Create user instances.
user_0 = User('Clint', 'Westwood', 'Whitehorse', 'Canada')
user_1 = User('Natalie', 'Portwoman', 'Los Angeles', 'USA')
user_2 = User('Roger', 'Nailstein', 'Zurich', 'Switzerland')
superuser = Superuser('Foo', 'Bar', 'Bletchley', 'UK')

Happy hacking!