Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Python simple import
# import a specific module
from vehicle.four_wheels import car
my_car = car.Car(transmission="automatic")
# import a specific class within a module
from import Car
my_car = Car(transmission="automatic")
# import everything from a module into the current namespace
from vehicle.four_wheels import *
my_car = Car(transmission="automatic")
my_bus = Bus(color="Yellow")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment