title: What happens when a module is imported twice?
body: <p>I have a doubt that I would like to get cleared up.</p>
  
  <p>Consider the following module named <code>ex_1.py</code>:</p>
  
  <pre><code>print("Hello, I'm ex_1")
  def greet(name):
   print("Hello, "+name+" nice to meet you! ")
  </code></pre>
  
  <p>Now consider another file called <code>1_client_ex_1.py</code> that will import <code>ex_1.py</code> module.</p>
  
  <pre><code>import ex_1.py
  </code></pre>
  
  <p>Now when I execute this file, I get the output as :</p>
  
  <pre><code>Hello, I'm ex_1
  </code></pre>
  
  <p>As expected.</p>
  
  <p>But when I change to <code>1_client_ex_1.py</code> to:</p>
  
  <pre><code>import ex_1.py
  import ex_1.py
  </code></pre>
  
  <p>and execute it, it still prints only <code>Hello, I'm ex_1</code> once. Shouldn't it print it twice?</p>