the import statement is used for importing modules or specific classes or functions from modules we've already seen an example of this in our point class in the previous section we used the import statement to get python' built-in math module and use its sqrt function in our distance calculation here' concrete example assume we have module called database py that contains class called databaseand second module called products py that is responsible for product-related queries at this pointwe don' need to think too much about the contents of these files what we know is that products py needs to instantiate the database class from database py so that it can execute queries on the product table in the database there are several variations on the import statement syntax that can be used to access the classimport database db database database(do queries on db this version imports the database module into the products namespace (the list of names currently accessible in module or function)so any class or function in the database module can be accessed using the database notation alternativelywe can import just the one class we need using the from import syntaxfrom database import database db database(do queries on db iffor some reasonproducts already has class called databaseand we don' want the two names to be confusedwe can rename the class when used inside the products modulefrom database import database as db db db(do queries on db we can also import multiple items in one statement if our database module also contains query classwe can import both classes usingfrom database import databasequery