title: Python recursion
body: <p>I have to generate all the possible combinations of letters that represents a number sequence in a telephone... for example: if the entry is '423', the output should be:</p>
  
  <pre><code>GAD   GAE   GAF   GBD   GBE   GBF   GCD   GCE   GCF    
  HAD   HAE   HAF   HBD   HBE   HBF   HCD   HCE   HCF   
  IAD   IAE   IAF   IBD   IBE   IBF   ICD   ICE   ICF
  </code></pre>
  
  <p>I must use recursion to solve this... I started using a dictionary like this:</p>
  
  <pre><code>dic = {'2' : 'ABC', '3' : 'DEF', '4' : 'GHI', '5' : 'JKL', '6' : 'MNO', '7' : 'PQRS',     '8' : 'TUV', '9' : 'WXYZ'}
  </code></pre>
  
  <p>But I don't know how can I use a recursion here... Could someone help?</p>
  
  <p>I thought something like this to start with:</p>
  
  <pre><code>def telephoneSequence(str):
      for i in range (len(str)):
          return dic[str[i]]
  </code></pre>