title: Importing the PIL (Pillow) module in Python
body: <p>Why am I able to do this in Python 3.7:</p>
  
  <pre><code>from PIL import Image
  im = Image.open("hardcastle-crags-3462894.jpg")
  </code></pre>
  
  <p>But <strong>not</strong> this, which I had understood to be the same thing:</p>
  
  <pre><code>import PIL
  im = PIL.Image.open("hardcastle-crags-3462894.jpg")
  </code></pre>
  
  <p>The latter gives result:</p>
  
  <pre><code>AttributeError: module 'PIL' has no attribute 'Image'
  </code></pre>
  
  <p>I had understood these to be the same thing. Why does one work and the other does not?</p>