this introduced python' package import model--an optional but useful way to explicitly list part of the directory path leading up to your modules package imports are still relative to directory on your module import search pathbut your script gives the rest of the path to the module explicitly as we've seenpackages not only make imports more meaningful in larger systemsbut also simplify import search path settings if all cross-directory imports are relative to common root directoryand resolve ambiguities when there is more than one module of the same name--including the name of the enclosing directory in package import helps distinguish between them because it' relevant only to code in packageswe also explored the newer relative import model here-- way for imports in package files to select modules in the same package explicitly using leading dots in frominstead of relying on an older and errorprone implicit package search rule finallywe surveyed python namespace packageswhich allow logical package to span multiple physical directories as fallback option of import searchesand remove the initialization file requirements of the prior model in the next we will survey handful of more advanced module-related topicssuch as the __name__ usage mode variable and name-string imports as usualthoughlet' close out this first with short quiz to review what you've learned here test your knowledgequiz what is the purpose of an __init__ py file in module package directory how can you avoid repeating the full package path every time you reference package' content which directories require __init__ py files when must you use import instead of from with packages what is the difference between from mypkg import spam and from import spam what is namespace packagetest your knowledgeanswers the __init__ py file serves to declare and initialize regular module packagepython automatically runs its code the first time you import through directory in process its assigned variables become the attributes of the module object created in memory to correspond to that directory it is also not optional until and later--you can' import through directory with package syntax unless it contains this file module packages