import <module> # Imports a built-in or '<module>.py'.
import <package> # Imports a built-in or '<package>/__init__.py'.
import <package>.<module> # Imports a built-in or '<package>/<module>.py'.
```
* **Package is a collection of multiple modules, but it can also define its own objects. Python treats any directory containing a file called `'__init__.py'` as a package.**
* **Running `'import <package>'` does not automatically provide access to package's modules unless they are imported in its init script.**
<div><h2id="imports"><ahref="#imports"name="imports">#</a>Imports</h2><pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">import</span><module><spanclass="hljs-comment"># Imports a built-in or '<module>.py'.</span>
<spanclass="hljs-keyword">import</span><package><spanclass="hljs-comment"># Imports a built-in or '<package>/__init__.py'.</span>
<spanclass="hljs-keyword">import</span><package>.<module><spanclass="hljs-comment"># Imports a built-in or '<package>/<module>.py'.</span>
</code></pre></div>
<ul>
<li><strong>Package is a collection of multiple modules, but it can also define its own objects. Python treats any directory containing a file called <codeclass="python hljs"><spanclass="hljs-string">'__init__.py'</span></code> as a package.</strong></li>
<li><strong>Running <codeclass="python hljs"><spanclass="hljs-string">'import <package>'</span></code> does not automatically provide access to package's modules unless they are imported in its init script.</strong></li>
</ul>
<div><h2id="closure"><ahref="#closure"name="closure">#</a>Closure</h2><p><strong>We have a closure in Python when:</strong></p><ul>
<li><strong>A nested function references a value of its enclosing function and then</strong></li>
<li><strong>the enclosing function returns the nested function.</strong></li>