title: Whats the difference between a module and a library in Python?
body: <p>I have background in Java and I am new to Python. I want to make sure I understand correctly Python terminology before I go ahead.</p>
  
  <p>My understanding of a <strong>module</strong> is: a script which can be imported by many scripts, to make reading easier. Just like in java you have a class, and that class can be imported by many other classes.</p>
  
  <p>My understanding of a <strong>library</strong> is: A library contains many <strong>modules</strong> which are separated by its use. </p>
  
  <p>My question is: Are libraries like packages, where you have a package e.g. called <code>food</code>, then: </p>
  
  <blockquote>
    <ul>
    <li>chocolate.py </li>
    <li>sweets.py</li>
    <li>biscuts.py</li>
    </ul>
  </blockquote>
  
  <p>are contained in the <code>food</code> package? </p>
  
  <p>Or do libraries use packages, so if we had another package <code>drink</code>:</p>
  
  <ul>
  <li>milk.py </li>
  <li>juice.py</li>
  </ul>
  
  <p>contained in the package. The <code>library</code> contains two packages? </p>
  
  <p>Also, an application programming interface (API) usually contains a set of libraries is this at the top of the hierarchy: </p>
  
  <ol>
  <li>API </li>
  <li>Library</li>
  <li>Package</li>
  <li>Module</li>
  <li>Script</li>
  </ol>
  
  <p>So an API will consist off all from 2-5? </p>