title: pick a random number not in a list
body: <p>I have a list: </p>
  
  <pre><code>&gt; S = [1,8,93,3,8]
  </code></pre>
  
  <p>I need to pick a random number that is not in the list but within the max range of value. I am more concerned about time complexity O(n). The S could be a pretty big list.</p>
  
  <pre><code>import random
  
  S=[1,8,93,3,8]
  m = max(S)
  for x in xrange(m):
    rand = random.randint(1,m)
    if rand not in S:
        print rand
    else:
        print "Number - %d found in the array" % rand 
        break
  </code></pre>
  
  <p>I did not try list comprehension</p>