title: How to run a function multiple times in python
body: <p>I have a code: </p>
  
  <pre><code>import random
  
  vowels, consonants='aeiou','bcdfghjklmnpqrstvwxyz'
  
  terms = int(input("How many letters you want for your baby's name? "))
  
  def babyname():
      j=[]
      for i in range(0, terms):
          k = input("Would you like a [v]owel or [c]onsonant: ")
          if k.lower() == 'v':
              j.append(random.choice(vowels))
          elif k.lower() == 'c':
              j.append(random.choice(consonants))
          else:
              print("Unknown Input: "+ k)
      for x in range(0, 10):
          print(''.join(j))
  
  babyname()
  </code></pre>
  
  <p><strong>Input:</strong> I can input a number say 5 for the number of letters and v or c for those number of letters.</p>
  
  <p><strong>Expected output:</strong> For the input, I want to generate the generated text <code>j</code> for 10 times each one with different texts. For the example input, the expected output should be - sdfes gdadf nkadj like this 10 words.</p>
  
  <p><strong>Output yielded:</strong> Instead of getting 10 different texts, I am getting an output like sdfes sdfes sdfes - the same text for 10 times.</p>
  
  <p>How to solve this?     </p>