title: Create random number excluding numbers in a list
body: <p>So let's say I have a list of numbers (not a specific range, which could change), and want to generate a random number which excludes the numbers in the list.</p>
  
  <p>List of excluded numbers comes from a sql query.</p>
  
  <p>and the only limit for the random number is the number of digits, which can come from:</p>
  
  <pre><code>random_number = ''.join(random.choice(chars) for _ in range(size))
  </code></pre>
  
  <p>so I want to generate the random number (with size limit) excluding a list of numbers.</p>
  
  <pre><code>while random_number in exclude_list:
      random_number = ''.join(random.choice(string.digits) for _ in range(size))
  </code></pre>
  
  <p>Is there a pythonic way (other than using while loop) to do that?</p>
  
  <p>example: generate a 2digit random number which does not exist in a list of numbers like exclude_list=[22,34,56,78]</p>