or use the as extension with the import statement to rename the path to shorter synonym in both casesthe path is listed in only one placein the from or import statement in python and earliereach directory listed in an executed import or from statement must contain an __init__ py file other directoriesincluding the directory that contains the leftmost component of package pathdo not need to include this file you must use import instead of from with packages only if you need to access the same name defined in more than one path with importthe path makes the references uniquebut from allows only one version of any given name (unless you also use the as extension to rename in python xfrom mypkg import spam is an absolute import--the search for mypkg skips the package directory and the module is located in an absolute directory in sys path statement from import spamon the other handis relative import --spam is looked up relative to the package in which this statement is contained only in python xthe absolute import searches the package directory first before proceeding to sys pathrelative imports work as described namespace package is an extension to the import modelavailable in python and laterthat corresponds to one or more directories that do not have __init__ py files when python finds these during an import searchand does not find simple module or regular package firstit creates namespace package that is the virtual concatenation of all found directories having the requested module name further nested components are looked up in all the namespace package' directories the effect is similar to regular packagebut content may be split across multiple directories test your knowledgeanswers