title: python list comprehension alphabet generation
body: <p>I am trying to make use of list comprehension.</p>
  
  <p>My intended aim of the code is 
  come with the values,</p>
  
  <pre><code>['aaaa','bb','cccc','ddddddd','eee','f','ggggg']
  </code></pre>
  
  <p>and it should not display values beyond <code>'g'</code> based on number of elements in the list.</p>
  
  <p>If I have 8 elements in another list <code>b</code> then it should display <code>'h'</code> too.</p>
  
  <p>Can I achieve this via list comprehension with two for loops?</p>
  
  <pre><code>import string
  b = [4, 2, 4, 7, 3, 1, 5]
  d = [ s*i for i in range(len(b)) for s in list(string.ascii_lowercase) ]
  </code></pre>
  
  <p>I tried to use this code but in vain</p>
  
  <pre><code>[chr(i) for i in range(ord('a'), ord('z') + 1)]
  </code></pre>