title: Don't understand cause of this KeyError when importing module
body: <p>I am new to creating modules in Python, and I want to create a module and export the results. I have the following so far and I named the module <code>Card_module</code>:</p>
  
  <pre><code>from random import shuffle
  
  def Cards(deck,colour):
      for item in colour:
          return (item,deck)
  
  def Vdeckk():
      colour=['RED', 'YELLOW', 'BLACK']
      deck=[]
      deck=[Cards(value,colour)for value in range(1,11)]
      return (deck)
  
  if __name__=='__main__':
      Vdeckk()
  </code></pre>
  
  <p>When I run <code>import Card_module</code> then <code>Card_module.Vdeckk()</code> I receive the following error message:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;ipython-input-61-8a304a818b2c&gt;", line 1, in &lt;module&gt;
      Card_module.Vdeckk()
    File "C:\Users\mnazari\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\displayhook.py", line 258, in __call__
      self.update_user_ns(result)
    File "C:\Users\mnazari\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\displayhook.py", line 196, in update_user_ns
      if result is not self.shell.user_ns['_oh']:
  KeyError: '_oh'
  </code></pre>