title: Generate random integers between 1 and 1000
body: <p>I have attached my code. I want the output to be :</p>
  
  <pre><code>[675, 556, 329]
  [554, 469, 784, 133]
  [896, 414, 662, 826, 501]
  
  </code></pre>
  
  <p>However the output I get is simply:</p>
  
  <pre><code>[321]
  [32]
  [342]
  </code></pre>
  
  <p>How can I show three items in the list instead of just one?</p>
  
  <p>My code is:</p>
  
  <pre><code>import random
  # Create your function here
  
  def random_number_generator(l):
      number = []
      length = len(number)
      for length in range(0, l):
          number.append(random.randrange(0,1000))
          return number
  
  print(random_number_generator(3)) 
  print(random_number_generator(4))
  print(random_number_generator(5))
  </code></pre>