title: How can I generate random numbers based on a pattern from a given list of numbers?
body: <p>I'm trying to generate x random numbers based on lists I will provide (containing the same amount of numbers I want generated).
  So Far I have this code:</p>
  
  <pre><code>import random
  list = []
  
  while len(list) &lt; 10:
      x = random.randint(1, 100)
      if x not in list:
          list.append(x)
  
  list.sort()
  print (list)
  </code></pre>
  
  <p>The question is, how do I input the lists I have so Python can read some pattern (in lack of a better word) and generate numbers?
  Tried Google it, found nothing so far.
  Thanks.</p>